Open octref opened 3 years ago
If you need to point to addresses in another century, you will need to use the 1902A01
format.
Is that something that you need implemented in the arvelie.h
file? I could add support for that if you're using it.
Thanks for the quick answer! I'm implementing a JS version (EDIT: https://github.com/octref/arvelie) to use it on my own website. I compiled the reference C library, and also notice that:
arvelie > ./arvelie 03+01
Error: Invalid arvelie date (Expecting 2003-12-31)
arvelie > ./arvelie 20+02
Error: Invalid arvelie date (Expecting 2020-02-29)
Is that something that you need implemented in the arvelie.h file? I could add support for that if you're using it.
It seems you are handling input of length 5 and 10, so handling input of length 7 would be great, as it must be an arvelie date with full year. I can also send a PR myself.
I have a patch that makes it work this way:
> ./arvelie 1920A01
1920-01-01
# if year is not 20xx, use full arvelie format
> ./arvelie 1920-01-01
1920A01
Does that look fine to you? If so I'll send a PR.
as long as it doesn't break compat with the current format sure :)
I'd like to use arvelie to denote moment in the past or future.
Time such as
02A01
refers to2002-01-01
, but1902-01-01
finds no representation in arvelie.