# datetime and datenumber package conflict?

## Background

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

## Problem

The following results in an empty day name:

\usepackage{datetime}
\usepackage{datenumber}
% ...
\shortdayofweekname{\day}{\month}{\year}


The following works as expected:

\usepackage{datetime}
% ...
\shortdayofweekname{\day}{\month}{\year}


Would like to do the following:

\usepackage{datetime}
\usepackage{datenumber}
% Preamble
\setdatetoday
\setdatebynumber{\thedatenumber}%
% Document...
\shortdayofweekname{\thedateday}{\thedatemonth}{\thedateyear}


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


## Question

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! – Yiannis Lazarides Jan 11 '11 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). ;-) – Dave Jarvis Jan 11 '11 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 '11 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. – Yiannis Lazarides Jan 12 '11 at 1:00

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

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

\usepackage[polutonikogreek, german, greek,
french, english]{babel}[2005/11/23]
\begin{document}
%% From datetime
\shortdayofweekname{\day}{\month}{\year}
%% From datenumber
\datedayname
\end{document}


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

\newcounter{dateone}%
\newcounter{datetwo}%
\newcommand{\daydifftoday}[3]{%
\setmydatenumber{dateone}{\the\year}{\the\month}{\the\day}%
\setmydatenumber{datetwo}{#1}{#2}{#3}%

When I reverse them, I get a cryptic error, You can't use 'the character 7' after \advance. – Dave Jarvis Jan 11 '11 at 1:31