penultimatedays.jl

A not-at-all useless addition to Julia's Dates standard lib to find penultimate days of the week, month, quarter, and year

https://github.com/jakewilliami/penultimatedays.jl

Science Score: 44.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (9.3%) to scientific vocabulary

Keywords

dates julia julia-language
Last synced: 6 months ago · JSON representation ·

Repository

A not-at-all useless addition to Julia's Dates standard lib to find penultimate days of the week, month, quarter, and year

Basic Info
  • Host: GitHub
  • Owner: jakewilliami
  • License: mit
  • Language: Julia
  • Default Branch: master
  • Homepage:
  • Size: 1.04 MB
Statistics
  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • Open Issues: 2
  • Releases: 1
Topics
dates julia julia-language
Created over 3 years ago · Last pushed 6 months ago
Metadata Files
Readme License Citation

README.md

PenultimateDays.jl

Dev CI Code Style: Blue <!-- Project Status -->

Similar to Dates' firstdayof* and lastdayof*, I introduce to you penultimatedayof*; a useful function to find the second-to-last day of a measure of time.

Unlike Dates' *dayof* functions, I have extended functionality to find, for example, the penultimate Tuesday of a measure of time. We have also extended some of Dates' *dayof* functions to allow this functionality.

See also jakewilliami/pt for a command-line implementation using logic from this package.

Quick Start

```julia-repl julia> using Dates, PenultimateDays

julia> d = today() 2022-06-24

julia> penultimatedayofweek(d) # second-to-last day of the week 2022-06-25

julia> penultimatedayofmonth(d) # second-to-last day of the month 2022-06-29

julia> penultimatedayofmonth(d, Tuesday) # second-to-last Tuesday of the month 2022-06-21

julia> penultimatedayofquarter(d) # second-to-last day of the quarter 2022-06-29

julia> penultimatedayofquarter(d, Tuesday) # second-to-last Tuesday of the quarter 2022-06-21

julia> penultimatedayofyear(d) # second-to-last day of the year 2022-12-31

julia> penultimatedayofyear(d, Tuesday) # second-to-last Tuesday of the year 2022-12-20 ```

Extending the Dates standard library

We have also extended the Dates standard library to allow specification of day for *dayof* functions: ```julia-repl julia> using Dates, PenultimateDays

julia> d = today() 2022-06-24

julia> firstdayofmonth(d, Tuesday) 2022-06-07

julia> lastdayofmonth(d, Tuesday) 2022-06-28 ```

Citation

If your research depends on PenultimateDays.jl, please consider giving us a formal citation: citation.bib.

Owner

  • Name: Jake Ireland
  • Login: jakewilliami
  • Kind: user
  • Location: ///scary.zealous.twin

Citation (citation.bib)

@software{ireland2023penultimatedays,
  title={{PenultimateDays.jl}: An addition to {Julia}'s {Dates} standard lib to find penultimate days of the week, month, quarter, and year},
  author={Ireland, Jake W},
  year={2023},
  howpublished={\url{https://github.com/jakewilliami/PenultimateDays.jl}},
  note={{Julia} package version 0.1.0}
}

GitHub Events

Total
  • Push event: 241
Last Year
  • Push event: 241

Committers

Last synced: 11 months ago

All Time
  • Total Commits: 29
  • Total Committers: 2
  • Avg Commits per committer: 14.5
  • Development Distribution Score (DDS): 0.034
Past Year
  • Commits: 1
  • Committers: 1
  • Avg Commits per committer: 1.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Jake Ireland j****i@i****m 28
CompatHelper Julia c****y@j****g 1
Committer Domains (Top 20 + Academic)

Dependencies

.github/workflows/CI.yml actions
  • actions/cache v1 composite
  • actions/checkout v2 composite
  • julia-actions/julia-buildpkg latest composite
  • julia-actions/julia-runtest latest composite
  • julia-actions/setup-julia v1 composite
.github/workflows/CompatHelper.yml actions
.github/workflows/TagBot.yml actions
  • JuliaRegistries/TagBot v1 composite