About
Shop
LaTeX
Free Software
Books
News
Contact
Blog
News (2017-09-10): New application bib2gls for use with glossaries-extra.sty.

datetime package (obsolete) FAQ

Search: Category:
Search Tips

This is the FAQ for the obsolete datetime package. This package has been replaced by datetime2.

General Queries

How do I change the date separator for numerical dates?

The default date separator for numerical dates is / as from version 2.43, this can be changed by redefining \dateseparator.

Last Modified: 2013-12-08 16:49:49

Top

How do I change the time separator for numerical times?

As from version 2.43, this can be changed by redefining \timeseparator

Last Modified: 2013-12-08 16:50:19

Top

How can I save a date for later use?

As from version 2.45, you can save a date using \newdate. See the datetime documentation for details.

Last Modified: 2013-12-09 10:26:04

Top

Is there multilingual support for the days of the week?

Currently there is only limited support for the days of the week. If you want support for another language, please post a feature request with the equivalent of the following code, replacing english with the language name (as used by babel) and replacing Sunday etc with the appropriate translations (including accent commands etc):
\providecommand{\dayofweeknameidenglish}[1]{%
\ifcase#1\relax
\or Sunday%
\or Monday%
\or Tuesday%
\or Wednesday%
\or Thursday%
\or Friday%
\or Saturday%
\fi}

\providecommand{\shortdayofweeknameidenglish}[1]{%
\ifcase#1\relax
\or Sun%
\or Mon%
\or Tue%
\or Wed%
\or Thu%
\or Fri%
\or Sat%
\fi}
Please use actual LaTeX commands for the accents as the package code needs to be encoding-independent.

Last Modified: 2013-12-08 16:54:53

Top

Is there multilingual support for \textdate?

\textdate was defined before multilingual support was added, and so uses the English style of writing a textual date, which won't be appropriate for other languages, so it won't look right if used if the current language is not English. If you want to write your own textual date format, you need to bear in mind that the fmtcount package (which is used to convert numbers and ordinals into words) only has very limited multilingual support, and see also Is there multilingual support for the days of the week?.

Last Modified: 2013-12-08 16:56:36

Top

Why is there only limited multilingual support?

Because there is a limit to the number of languages I can speak! I am therefore dependent on people supplying me the information for all the other languages.

Last Modified: 2013-12-08 16:57:16

Top

Why is the default format UK English?

I originally wrote datetime as an alternative to ukdate, which isn't in the major TeX distributions. (This was before babel.) datetime was only intended as a UK date formatting package, but after repeated requests, I added multi-lingual support. The UK format remained as the default.

Last Modified: 2013-12-08 17:03:14

Top

How can I set up a different set of default package options?

Create a file called datetime.cfg, and put the appropriate commands in it. Then save it to somewhere on the TeX path. However, if you share your document code with other people, make sure you also supply your custom datetime.cfg file if it's important that they replicate your date and time format.

Last Modified: 2013-12-09 09:36:37

Top

How do I make just the year appear?

You don't need datetime for this. Just use \the\year.

Last Modified: 2013-12-08 17:06:29

Top

Why can't my package manager find datetime.sty?

The datetime package has been made obsolete. The replacement package is datetime2.

Obsolete packages remain available in the CTAN obsolete tree. Your TeX distribution may not contain some obsolete packages. If this is the case, you will need to download datetime.sty from CTAN and manually install.

It's your choice if you want to continue to use an obsolete package, but you should be aware that any issues with unmaintained packages won't be fixed.

Last Modified: 2015-03-27 05:57:18

Top

Unexpected Output

A space appears after \currenttime

This has been fixed in version 2.46.

Last Modified: 2013-12-08 17:07:18

Top

The date is in another language or in the wrong format

Make sure you are using at least version 2.49 of the datetime package, and at least version 1.07 of the fmtcount package. If you are using UKenglish or USenglish, make sure you are using at least version 2.53 of the datetime package. Remember also that you must load babel before loading the datetime package.

Last Modified: 2013-12-08 17:08:41

Top

\pdfdate is incorrect between 00:00 and 00:59

This has been fixed in version 2.48.

Last Modified: 2013-12-08 17:09:19

Top

The month name always appears in English regardless of the current language setting

This has been fixed in version 2.55.

Last Modified: 2013-12-08 17:09:44

Top

Package Errors

\currenttime causes a problem in the argument of certain commands

In versions prior to 2.46, you need to \protect it. As from version 2.46, \currenttime has been made a robust command.

Last Modified: 2013-12-08 17:11:43

Top

\today causes a problem in the argument of certain commands

In versions prior to 2.46, you need to \protect it. As from version 2.46, \today has been made a robust command. The same also applies to declarations which change the date format (e.g. \longdate), and also \currenttime.

Last Modified: 2013-12-08 17:12:53

Top

\longdate etc cause a problem in the argument of certain commands

In versions prior to 2.46, you need to \protect it. As from version 2.46, \longdate etc have been made robust.

Last Modified: 2013-12-08 17:14:08

Top

Undefined control sequence \ier

Make sure you are using at least version 2.49 of the datetime package, and at least version 1.06 of the fmtcount package.

Last Modified: 2013-12-08 17:14:54

Top

Unknown language 'english' error

Make sure you are using at least version 2.49 of the datetime package, and at least version 1.06 of the fmtcount package.

Last Modified: 2013-12-08 17:15:39

Top

\textdate causes an error

You are probably using an old version of datetime with a new version of fmtcount.

Last Modified: 2013-12-08 17:16:32

Top

LaTeX2HTML support

Why does LaTeX2HTML ignore datetime.cfg?

Because I haven't worked out how to implement it.

Last Modified: 2013-12-08 17:17:48

Top

Why are some languages supported in datetime.sty but not in the LaTeX2HTML version?

Because they are not supported by the LaTeX2HTML implementation of the babel package.

Last Modified: 2013-12-08 17:18:22

Top

© 2012 Dickimaw Books. "Dickimaw", "Dickimaw Books" and the Dickimaw parrot logo are trademarks. The Dickimaw parrot was painted by Magdalene Pritchett.

Terms of Use Privacy Policy Site Map FAQs