Skip to content

Commit

Permalink
Implemented {weekday0}
Browse files Browse the repository at this point in the history
  • Loading branch information
peterdalle committed Mar 21, 2022
1 parent 987faa6 commit 1953d99
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ pip install pathbuilder
Development version:

```bash
pip install git+https://github.com/peterdalle/pathbuilder.git@v0.9.2
pip install git+https://github.com/peterdalle/pathbuilder.git@v0.9.3
```

## Example
Expand Down Expand Up @@ -67,6 +67,7 @@ Date/time keyword | Translates into
`{minute}` | Minute 0-59
`{second}` | Second 0-59
`{month0}` | Month with zero padding (01-12)
`{weekday0}` | Weekday with zero padding (01-07)
`{day0}` | Day with zero padding (01-31)
`{hour0}` | Hour with zero padding (00-23)
`{minute0}` | Minute with zero padding (00-59)
Expand Down
2 changes: 1 addition & 1 deletion pathbuilder/pathbuilder.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def _builtin_keywords(self) -> dict:
"minute": datetime.now().minute,
"second": datetime.now().second,
"month0": datetime.now().strftime("%m"),
"weekday0": datetime.now().date().weekday() + 1, # identical to "weekday", but kept for consistency with naming scheme
"weekday0": "0" + str(datetime.now().date().weekday() + 1),
"day0": datetime.now().strftime("%d"),
"hour0": datetime.now().strftime("%H"),
"minute0": datetime.now().strftime("%M"),
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

setup(
name="pathbuilder",
version="0.9.2",
version="0.9.3",
author="Peter M. Dahlgren",
author_email="peterdalle@gmail.com",
packages=find_packages(),
Expand Down

0 comments on commit 1953d99

Please sign in to comment.