Trying to include a date two days in the future from when the content was generated.


The following results in an empty day name:

% ...

The following works as expected:

% ...

Would like to do the following:

% Preamble
% Document...

It looks like there is a package conflict.

Desired Output

For example, if today was January 10, 2011, then the result should read:

Wed Jan 12 18:03:02 EST 2011


I have emailed the datetime package author; what else can be done to resolve the problem?

Thank you!

  • Why do you need the to-day's time after two days? The string you also printing is very non-standard see en.wikipedia.org/wiki/Coordinated_Universal_Time. For what you are after two packages are an overkill! Jan 11, 2011 at 3:02
  • @Yiannis: The string I am printing is the default output format for a Java string; I am looking to emulate it in LaTeX so that I can show the reader what output to expect. I cannot change the format without customizing all the Java Virtual Machines in the world (or change my example). ;-) Jan 11, 2011 at 4:01
  • @Yiannis: How is that nonstandard? It's exactly the format produced by the standard date command. The man page tells me that "[t]he date utility is expected to be compatible with IEEE Std 1003.2 ('POSIX.2')."
    – TH.
    Jan 11, 2011 at 10:22
  • @TH Best source for datetime is the pdfcreation stamp. This is based on UTC. UTC does not define TimeZone strings such as EST, as they are confusing for example EST is both European Summer Time, the daylight-saving time used in Europe and the US Eastern Standard Time. There are also problems for some countries like Russia having 9 different time zones. The IEEE Std (much older than the ISO ones does allow). You can imagine you are an ISP sorting emails and you can see the difficulties. Jan 12, 2011 at 1:00

1 Answer 1


This is my normal header for dates and it works for both, as well as the Koma script date and time classes.

\usepackage{datenumber,datetime,scrdate,scrtime} %time related macros

\usepackage[polutonikogreek, german, greek, 
    french, english]{babel}[2005/11/23]
%% From datetime
%% From datenumber

Just reverse the packages. With datetime you also need to watch that it is loaded before babel.

Create new counters and a command for daydiff


There are still \daydifftoday{\the\year}{12}{25} days to Christmas.
  • When I reverse them, I get a cryptic error, You can't use 'the character 7' after \advance. Jan 11, 2011 at 1:31
  • @Dave Jarvis It does appear that there is a conflict, but my minimal above works! I always check them before posting. Jan 11, 2011 at 1:34
  • Does it work if you use the preamble I've shown? (I can get the simple case working alright, but when I try to get the day name two days hence, it fails.) Jan 11, 2011 at 1:37
  • @Dave Jarvis - see edit above. Jan 11, 2011 at 1:48
  • I have clarified the problem a bit more. Jan 11, 2011 at 2:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.