Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

%%date: change defaults from YYYYMMDD to YYYY-MM-DD #99

Open
GoogleCodeExporter opened this issue Apr 18, 2015 · 3 comments
Open

%%date: change defaults from YYYYMMDD to YYYY-MM-DD #99

GoogleCodeExporter opened this issue Apr 18, 2015 · 3 comments

Comments

@GoogleCodeExporter
Copy link

Currently when using the %%date (and %%mtime) macro without formatting, the 
default date is expanded to the YYYYMMAA format.

It's mentioned in samples/sample.t2t that this is the ISO format. It's true, 
it's ISO 8601. But we're using the basic format, without separators. I think 
it's better to use the extended format, with hyphens: YYYY-MM-DD.

From http://en.wikipedia.org/wiki/ISO_8601:

For example, the 6th day of the 1st month of the year 2009 may be written as 
"2009-01-06" in the extended format or simply as "20090106" in the basic format 
without ambiguity. The extended formats are preferred over the basic formats 
not only for human readability, but because some basic formats can appear to be 
ambiguous to those unfamiliar with the standard.


The downside is that YYYYMMDD is the format used since day zero, because %%date 
was created in txt2tags-0.1. It will surprise users.

Consider making this change now or in v3.

Original issue reported on code.google.com by aureliojargas@gmail.com on 10 Dec 2010 at 9:48

@GoogleCodeExporter
Copy link
Author

YYYY-MM-DD is way better than YYYYMMAA, but it's never a good thing to surprise 
users this way if they expect something else.

So here are the options:

- keep the not very user friendly default behavior and use a new switch to 
change this behavior (like --fix-date or --extended-date) but people annoyed by 
the default behavior would probably have already used %%date(%Y-%m-%d) or even 
a preproc to change this. I'm less in favor of this.

- change the current default behavior and wait to see users' feedbacks. No 
reaction = nobody care and everybody is pleased. It's probably quite safe to 
use this option.


Original comment by eforg...@gmail.com on 11 Dec 2010 at 10:55

@GoogleCodeExporter
Copy link
Author

I'm against a new option just for this little issue. On the other hand, maybe a

%!dateformat: %Y-%m-%d

setting to config the default %%date format when none is specified could be 
interesting.

Original comment by aureliojargas@gmail.com on 15 Dec 2010 at 4:18

@GoogleCodeExporter
Copy link
Author

It would be even greater, so people could use their favorite format by default

Original comment by eforg...@gmail.com on 15 Dec 2010 at 4:26

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant