Comments (4)
Looking back at the part description:
WW
- Short week (since start of year) - 1, 2, 33, 520W
- Zero-padded week - 01, 02, 33, 52
I don't think these can actually correspond to any of the four week numbering schemes I mentioned in the PR as those use either the range [0-52]
or [1-53]
, but none of them use the range [1-52]
.
from calver.
Personally I think all this is tedious and I would advise people to not use such numbers, but if they must then these are the definitions I would suggest:
WW
- Short week (Mondays since start of year) - 0, 1, 2, 33, 52 - (corresponds tostrftime("%W")
)0W
- Zero-padded week - 00, 01, 02, 33, 52UU
- Short week (Sundays since start of year) - 0, 1, 2, 33, 52 (corresponds tostrftime("%U")
)0U
- Zero-padded week - 00, 01, 02, 33, 52
The above can be used together with the normal YYYY
/YY
/0Y
but if ISO 8601 week numbers are used, then they should only be used in conjunction with GGGG
/GG
/0G
.
GGGG
- ISO 8601 week-based year (corresponds tostrftime("%G")
)GG
- Short ISO 8601 week-based year0G
- Zero-padded ISO 8601 week-based yearVV
- Short ISO 8601 week - 1, 2, 33, 53 (corresponds tostrftime("%V")
)0V
- Zero-padded week - 1, 2, 33, 53
See also:
- https://man7.org/linux/man-pages/man3/strftime.3.html
- https://docs.python.org/3/library/datetime.html#strftime-and-strptime-format-codes
from calver.
I agree it's a bit tedious. I consider CalVer more descriptive than an enforceable standard. Note the note in that section which specifies that projects claiming to be CalVer need to state any unconventional calendar choices. (Still waiting for the day I do a Jalali CalVer project).
I'm not even sure using ISO as the default helps:
Weeks start with Monday. Each week's year is the Gregorian year in which the Thursday falls. The first week of the year, hence, always contains 4 January. ISO week year numbering therefore slightly deviates from the Gregorian for some days close to 1 January.
Hardly intuitive, that seems like that's going to need explanation for most audiences regardless.
So I'm not sure if all the notation is necessary. We always have the option of letting the maintainer specify what's meant by "week". They know their audience best.
We can add a note that says week segments should be used with caution, because there are so many definitions, but when in use the range won't exceed 00-54, and that it's up to maintainers to specify the semantics further.
from calver.
Oh wow, I didn't know about 54 week years. So much fun!
Rather than go back and forth on PR #31, should I close and let you (re)write yourself.
Since PyCalVer will be generate week numbers, I'll have to decide on some definition. I think I'll go forward with the above parts, since they're easy to implement with strftime
.
from calver.
Related Issues (20)
- https://calver.org/ TLS certificate expired HOT 1
- Tesla Firmware version
- ECMAScript (a.k.a. "JavaScript") have been using CalVer since 2015 HOT 1
- Add internationalization support HOT 7
- Add: Freight Trust Network rulebook
- Docker Engine HOT 2
- youtube-dl versioning HOT 11
- youtube dl link broken HOT 1
- Grammar? HOT 5
- KDE Applications HOT 1
- Javascript Implementation & Maybe Clients Section In The Website
- OPNsense is calver
- OpenWRT/LEDE is calver
- Examples HOT 1
- Feature request: Seconds-level versioning granularity? HOT 2
- Be clear and opinionated about what CalVer is and is not HOT 5
- Conda switched to CalVer
- Typo in Scheme Section: Zero-padded year example HOT 2
- CalVer.org website is showing "ZeroVer: 0-based Versioning" instead CalVer documentation. HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from calver.