Questions tagged [datetime]

{datetime} is about either setting time stamps for your document or handling time data in {diagrams} (e.g., using {pgfplots}). If you are setting the date/time for a title, include the {titles} tag.

Filter by
Sorted by
Tagged with
1 vote
1 answer
46 views

How to calculate the number of days (and weeks) between a date and \today

Background: I've been trying to find a way to get LaTeX to automatically calculate the number of days and weeks (and even years for the sake of completeness) elapsed between a predefined date and \...
user avatar
  • 819
0 votes
2 answers
66 views

How to make counter which count mondays of specific month?

I want to construct a counter with two arguments - year and month, say \tt{year}{month}. The usage like blah-blah \tt{2022}{6}, blah-blah \tt{2022}{6} gives blah-blah 06/06, blah-blah 13/06. If the ...
user avatar
  • 71
1 vote
3 answers
73 views

datetime, language not supported

I want to use the datetime package to get the name of the months, but the package does not support one of the languages I am using. I am writing a template (with a .sty file), so I want to be able to ...
user avatar
  • 1,022
0 votes
1 answer
28 views

Set specific dates

I have spent a fair couple of hours on this, including searching this forum, but I still haven't managed to solve my issue, therefore decided to ask a question here. I am trying to run the following ...
user avatar
2 votes
1 answer
57 views

How to use two different date formats: yymmdd and dd/mm/yyyy?

I would like to be able to use, in the same document, these two date formats: dd/mm/yyyy (as default format) yymmdd (as "local" format) Why I want that? Because I would like to use the &...
user avatar
0 votes
0 answers
31 views

tabularx package compatibility for question 408900 (Protocol)

In the question How can make a protocol in latex? there is an interesting solution given by Werner. The problem is that if you try to insert it in a document using one (just one) of the following ...
user avatar
  • 834
0 votes
1 answer
192 views

How to change the timezone of my latex document irrespective of my computer time zone using datetime2?

I want to change the timezone format (say, I want to use always GMT-3 timezone). I am using the datetime2 package. Do I need to use the following command as mentioned in the manual? \DTMdisplayzone{〈...
user avatar
  • 83
0 votes
0 answers
29 views

How is \longdate defined in datetime

I would like to define my own date format similarly to \longdate or \shortdate with the datetime package such that it automatically changes based on the language selected for the babel package. ...
user avatar
  • 721
0 votes
1 answer
36 views

How to combine these two expl3-based functions to show the day of week in English?

I wrote a function \projlib_datetime_calculate_day_of_week_with_year_month_day:nnn to calculate the "day of week" given the year, month and day (the algorithm adopted should work for dates ...
user avatar
  • 6,246
0 votes
0 answers
13 views

Print file modification time in draft mode in multifile document

I'm processing a document that consists of a main file (main.tex) and a number of files that are included (chap1.tex, ..., chapn.tex). I have figured out how to use the Draftwatermark package to print ...
user avatar
  • 3,443
2 votes
3 answers
153 views

How can I extract a date from a file named YYYYMMDD.tex and convert it to date string?

I have a .tex file which is named 20160201.tex, and within that file, I would like to extract the filename without .tex and convert it to the string February 01, 2016? I am able to get the string via ...
user avatar
  • 31
1 vote
2 answers
164 views

Adding date on right [closed]

I want a result like this, a simple date on the right. Sorry for the question, I'm a beginner
user avatar
0 votes
2 answers
180 views

How to get the date info right aligned correctly inline with the name info?

I want the date info to come inline with my name and produce a pdf similar to I used the following code This results in slight offset on the date display( I wonder why the date is displayed above ...
user avatar
  • 101
1 vote
1 answer
60 views

display custom date with custom date format with datetime package

using 'datetime' package, one can produce a custom date with custom date format like this: \usepackage{datetime} \newdateformat{nwfmt}{\the\day, \THEDAY \monthday, \THEYEAR} \newdate{mydate}{21}{12}{...
user avatar
2 votes
0 answers
38 views

Find every weekend in a week: \advdate, \datetime

I am creating my own calendar. That means for each page in my book a day is reserved: dd.mm.yyy (day of week). Via a foreach loop I change the current date: \usepackage{advdate} \usepackage{datetime} ...
user avatar
0 votes
2 answers
97 views

Offset section currenttime by hours

I want to change timezone in a section of a document. An hour offset from server time would suffice. Using package datetime, how do I add or subtract hours from date \today? Using advdate and datetime ...
user avatar
0 votes
0 answers
53 views

Change slash to dot in biblatex [duplicate]

I am wondering how it is possible to change mm/yyyy to mm.yyyy in biblatex. Are these used correctly? alldates=terse labeldate=year if I say labeldate = year, wouldn't that usually lead to omitting ...
user avatar
0 votes
1 answer
52 views

How to simply insert month and year in middle of the paragraph?

I am writing my thesis and I want to insert month and year of some past events at lot of places! How to do that? Can anyone suggest me a simplest way to do it? I am very much beginner in LaTeX. And ...
user avatar
4 votes
1 answer
178 views

Date time in two rows in Italian format and time zone

I have now created this MWE: \documentclass[12pt,margin=3mm]{standalone} \usepackage{newtxtext} \usepackage[dvipsnames]{xcolor} \usepackage{tikz} \usepackage{datetime2} \usepackage{fontawesome5} \...
user avatar
  • 46.3k
0 votes
0 answers
45 views

How to add automatic Date that updates upon opening in Latex

I know there is a command called \today; this will show the date that the document is created. But how do I set the date that can automatically update depending on the date of opening the pdf?
user avatar
  • 101
2 votes
1 answer
78 views

Using \today in \hyperref package

Posting a question for the first time so please let me know if I missed anything. I am working in a LaTeX document and here is what I want to achieve using the hyper ref package: Have a URL that is ...
user avatar
1 vote
1 answer
103 views

Add days to a specific date in datetime2 in a for loop / foreach loop

I want to calculate the beginning and ending date of a week (first day is Monday, last is Sunday). This is working fine for a single date. Now I want to calculate the start and end of multiple weeks ...
user avatar
3 votes
0 answers
132 views

How do I add a dot inside the zeros on the date?

My MWE \documentclass[a4paper,11pt]{article} %%%%%%%%%%%%% dot with zero \makeatletter \newcommand*{\pmzerodot}{% \nfss@text{% \sbox0{$\vcenter{}$}% math axis \sbox2{0}% \sbox4{0\/}% \ooalign{% 0\...
user avatar
  • 3,210
4 votes
1 answer
186 views

How can I convert a datetime month name to uppercase?

I'm trying to create a date style that results in 01 JUN 2020 \documentclass{article} \usepackage[USenglish]{babel} \usepackage[showseconds=false,useregional=text,calc]{datetime2} \...
user avatar
  • 43
0 votes
0 answers
29 views

Expansion of datetime command

For a project I'm working on, I am writing text from a LaTeX document to a simple PHP document to use on a poster. However, I've run into a problem which I'm unable to resolve; I am using the ...
user avatar
  • 344
1 vote
1 answer
664 views

Print a date in LaTeX

I am looking for a LaTeX command or macro that will allow me to specify a date in a standard format which will then be formatted according to a globally set print format. For example, I would ...
user avatar
  • 145
1 vote
0 answers
59 views

Saving pdf with Date and name

I have a file called quotes.tex. When I run it, it creates my quote for that date for a certain customer. I now want to save this quote.pdf automatically as date_customer_quote. How can I do that? \...
user avatar
  • 105
1 vote
1 answer
113 views

Create date for expiry - future date

I'm able to change today's date to different format: month YEAR, normal and digits. Now I also need to add a future date: 28 days from today. How can I do that? \documentclass[a4paper,12p]{article} \...
user avatar
  • 105
1 vote
0 answers
29 views

Compare dates - display month/year only once [duplicate]

I want to compare dates and not display the same information twice. i.e. if I have been somewhere from 5/2/19 - 14/2/19 I want to display: "From 5th - 14th February 2019" rather than the long version, ...
user avatar
  • 105
4 votes
1 answer
57 views

How to get the date in MM/DD format with datetime2?

Probably straightforward, but it eluded me so far. \documentclass[ 12pt %,draft ]{report} \usepackage{babel} \usepackage[en-US]{datetime2} \begin{document} \DTMdate{2020-02-19} % 02/19/2020 \end{...
user avatar
  • 1,870
3 votes
2 answers
484 views

How can I assign unique numbers, or a sequence, in LaTeX?

I'm trying to make flashcards to export to Anki, a flashcard program. I'm using the following link: http://reh.math.uni-duesseldorf.de/~zibrowius/LatexNoteImporter/ I'd like to assign each card with ...
user avatar
0 votes
0 answers
103 views

Make documents where the date printed on the document is automatically the date of creation of document

Is there a way to create latex documents where the date printed on the documents is always by default the date of creation of the document? I don't want to compile the same latex file 30 days later ...
user avatar
1 vote
1 answer
92 views

Set \currenttime to specifc date and time

So I know this question may come across a bit weird but I'm looking for a way to change what LaTeX considers the current time. (In other words what \currenttime is for LaTeX) I'd like to have this ...
user avatar
1 vote
1 answer
281 views

Generate schedule planner between two given dates

I am trying to generate a table with the following format: I am looking for a way to generate the dates given the initial week (In this case Jun 3 - 7) I tried using the package datenumber but I am ...
user avatar
  • 265
3 votes
1 answer
877 views

pgfplots: How to add time axis as second x-axis?

I preprocessed a series of data into a time column and a further column with time distance to zero, the latter as decimal value. Minimum Working Example (MWE): \documentclass[border=5mm]{standalone} ...
user avatar
  • 3,458
2 votes
2 answers
152 views

Define cover colors based on current month

I am writing a style guide documentation and I want to make visually appealing what the document was updated using the cover color. The main idea is to automatically update cover color based on the ...
user avatar
  • 47
2 votes
1 answer
221 views

advancing dates in a 3-day syllabus

I am trying to adapt this advance date method for a 3-day syllabus without success. The goal is to create a M-W-F class schedule. The method in the link above is for a two-day schedule. It takes the ...
user avatar
  • 561
5 votes
1 answer
702 views

Adding clock-time at bottom left of every page

How can I add a time-stamp of the time of compilation of the latex document (day, and clock-time in the form of HH:MM:SS) at the bottom left corner of every page, below the contents of the document?
user avatar
0 votes
0 answers
95 views

Twice a week syllabus

I was trying to adapt the following code from three-times a week to two-times a week, unsuccessfully. Also, I want to change the date format so that it shows: Mon Jan 28. Any help appreciated. \...
user avatar
2 votes
1 answer
252 views

How to get the last two digits of next year?

It seems I can't solve the problem by google. I want to get the last two digits of the next year. I googled that the two digits of this year can be get by \Year{\the\year} \def\Year#1{\def\yy@##1##2##...
user avatar
  • 1,543
3 votes
1 answer
138 views

Tag \today in different countries

I would like to know if it is possible to specify another country than my home country as the reference for the tag \today. I need to submit works in a different time zone so when I submit it, ...
user avatar
2 votes
2 answers
217 views

How do I get \today to display today's date as 14-Sep-2018?

What I'm getting now from \today is: 14th September 2018 How do I change it to: 14-Sep-2018
user avatar
7 votes
1 answer
219 views

Day and Month instead of page numbering

I am writing a personal one year diary of 365 pages in LaTeX. I would use as page numbering day+month and not numbers, so: The first page number is not 1, but 1 Jan... Page number 32 is not 32, but 1 ...
user avatar
  • 73
10 votes
2 answers
605 views

How to calculate future dates based on custom date (e.g. 2018-05-05 + 14 days)?

I want to create invoices for customers in scrlttr2. Hereby I set the document date via \setkomavar{date}{\today}. I reuse this date with advdate to automatically add a payment deadline into the ...
user avatar
  • 3,458
0 votes
1 answer
618 views

Gantt chart with milliseconds as input

I want to create a diagram very similar to a Gantt chart. But it is in face run times from a workflow execution and they can be from milliseconds up to weeks... I am looking at pgfgant but I am not ...
user avatar
  • 11.1k
0 votes
2 answers
256 views

How to get the datetime2 package to display dates in South African format: "1 April 2018"

By default Latex formats the date as mmm d, yyyy, i.e. in the nonsensical middle endian format. I would like to display it as d Mmm yyyy, e.g. 1 April 2018. I've gone through the datetime2 ...
user avatar
  • 227
1 vote
1 answer
1k views

\formatdate without day

I frequently use the \formatdate{01}{02}{2016} command to get a result like Now I need the same thing, but without the day. I just need the month and year. Unfortunately, the \formatdate command ...
user avatar
  • 371
1 vote
1 answer
326 views

Change date format

How can I display certain dates as 2000/12 instead of 30. Dezember 2000 \documentclass{article} \usepackage{datetime2} \begin{document} \DTMdate{2000-12-30} %Prints as expected: 30. Dezember 2000 ...
user avatar
  • 295
3 votes
2 answers
2k views

How to change the language of datetime?

Сondition to change language of the month on titlepage doesn't work. How to write condition to activate russian or english date depending on the choice? XeLaTeX is used. My code doesn't work. MWE: ...
user avatar
  • 169
3 votes
3 answers
353 views

Command for today's date in two specific formats (12 Dec 17 and 12 December 2017)

I want to be able to just type either the short version or long version by a command, like \longtoday and \shorttoday. Some more examples of short dates are 12 May 17 and 01 Jan 07, long dates are the ...
user avatar

1
2 3 4 5 6