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
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
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
Statistics
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 2
- Releases: 1
Topics
Metadata Files
README.md
PenultimateDays.jl
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
- Website: https://jakewilliami.github.io/
- Twitter: JakeWIreland
- Repositories: 17
- Profile: https://github.com/jakewilliami
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
Top Committers
| Name | Commits | |
|---|---|---|
| Jake Ireland | j****i@i****m | 28 |
| CompatHelper Julia | c****y@j****g | 1 |
Committer Domains (Top 20 + Academic)
Dependencies
- 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
- JuliaRegistries/TagBot v1 composite