Skip to main content

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
0 votes
0 answers
41 views

tex compiler yield spurious timezone

I am in Timezone GMT+02, Germany. SOURCE_DATE_EPOCH=0 FORCE_SOURCE_DATE=1 lualatex test means that lualatex runs with time 0 seconds since 1970-01-01 midnight. To be more precise, it is the time when ...
user2609605's user avatar
0 votes
1 answer
46 views

What are the details of raw Mod/CreationTime in *latex metadata and of the TZ variable?

When compiling a latex document without compression (\DocumentMetadata{uncompress}) or when applying pdfinfo -rawdates xxx.pdf to the PDF file, we obtain the raw date which is for me something like D:...
user2609605's user avatar
3 votes
1 answer
38 views

How to remove the comma seperator between month and year in datetime package

I am using the orignal datetime package out of choice and I want to know how I can remove the comma separator that occurs between the month and year. Here is my code to view \documentclass{article} \...
user avatar
2 votes
1 answer
31 views

How can I remove the leading zero from the day using original datetime package

I need some help debugging even though I get my desired outcome there it still errors produced. I am using the original datetime package which I want. I am using the Australian date standard and I ...
user avatar
1 vote
0 answers
58 views

Setting and displaying date ranges extracted from filenames in the header

I already asked a related question about this topic some months ago. However, I have a project with this structure: Project: |- main.tex | |- pages |- 20230101.tex |- 20230102.tex |- ...
Lorenzo's user avatar
  • 77
0 votes
1 answer
29 views

Optional argument "#1" being evaluated before substitution in d\formatdate

I ran into a problem with the datetime package's \formatdate{}{}{} function when I was trying to create a custom environment which is like a journal entry with a date from optional arguments. I ...
anak's user avatar
  • 155
-1 votes
2 answers
98 views

Convert epoch timestamp to human readable [closed]

I am struggling to find out a way to do this simply. (or at all) Assuming I have the following: timestamp: 1697513559 timezone: -0500 How can I convert that to human readable format?
user606723's user avatar
1 vote
1 answer
62 views

How to format date inputed from file in date format and percentage?

I have inputs with tuple (date, percent) in a csv file: (The date are integers with 44 000 <-> 18 June 2020) date,pct 44755,0.01925374 44756,0.01925374 44757,0.01925374 [...] 44768,0.018989264 ...
stackoverflower's user avatar
1 vote
1 answer
212 views

date format for specific date

I am using the package like this: \usepackage[nodayofweek, short]{datetime} So when I am using \today it shows exactly what I want like this: So I have two questions. One, how to omit the year? Two, ...
liaoming999's user avatar
0 votes
2 answers
64 views

Ouptut the current time using `datetime` to a file

How do I print the current time to a file using the datetime pacakge. While running pdflatex I am generating a foo.def in which I would like to add a comment at the top with the current date time in ...
Peter Grill's user avatar
1 vote
1 answer
104 views

How to customize display of date and time of compiling

How do I customize date and time display for the compile date and time? I see the datetime2 package gives many predefined options, but what if I want to do something unique? The datetime2 mentions the ...
BrianWilson's user avatar
4 votes
1 answer
154 views

Capitalizing first character of \today independently of the language

I'm writing a document class that uses the datetime2 package to write a month-year date in the title of the document. Here is a MWE: \begin{filecontents}[overwrite]{customclass.cls} \...
Pedro's user avatar
  • 43
0 votes
1 answer
77 views

Capitalize \dayofweekname first letter

I'm working with dates, in particular with \dayofweekname. Is there any way to capitalize the first letter (i.e. the output monday should become Monday)? I tried with \MakeUppercase and \...
Lorenzo's user avatar
  • 77
0 votes
1 answer
72 views

Get date from filename and format it

I was trying to customize the header of a document when I encountered some difficulties. I'm working on this project in which there are several .tex files and each one is named as yyyyMMdd.tex. My ...
Lorenzo's user avatar
  • 77
1 vote
0 answers
117 views

Visual Studio Code LaTeX date time

I am using visual studio code LaTeX workshop. Here is my code : \documentclass{report} \usepackage[yyyymmdd,hhmmss]{datetime} \title{my title} \author{author} \date{Compiled at: \today-\currenttime} ...
温泽海's user avatar
0 votes
0 answers
43 views

How do I set the x axis as a time axis?

\documentclass[11pt, a4paper]{article} \usepackage{tikz} \usepackage{pgfplots} \pgfplotsset{compat=1.18} \begin{document} \begin{tikzpicture} \begin{axis} \addplot[scatter, only marks] table[x ...
Tiago Prazeres's user avatar
1 vote
0 answers
46 views

Incomplete \iffalse when using datetime package and \write

Objective A function that enables me to write custom log data. The result is the command \writeToLog (see MWE), which writes its input to the file log.txt. Issue In my actual document I'm using the ...
Steven's user avatar
  • 153
1 vote
1 answer
57 views

Removing date while preserving month and year from \today?

I wish to format today's date as october 2022. Emphasis on the lowercase october. I know that \today gives me October 24, 2022. How can I extract just the month and the year? I tried using \the\month \...
nikhilweee's user avatar
  • 1,669
4 votes
3 answers
224 views

How to insert the next month, like /today?

I'd like to create a command that would insert the next month (in relation to the current one), like so: \command -> November analogously to \today. The command cannot be hardcoded, as the ...
Zubo's user avatar
  • 582
2 votes
1 answer
235 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 \...
3kstc's user avatar
  • 991
0 votes
2 answers
105 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 ...
nail's user avatar
  • 101
2 votes
3 answers
270 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 ...
Vebjorn's user avatar
  • 1,884
0 votes
1 answer
384 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 ...
Jan Stuller's user avatar
2 votes
1 answer
633 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 &...
zetyty's user avatar
  • 777
0 votes
0 answers
43 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 ...
c05772's user avatar
  • 864
0 votes
1 answer
2k 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{〈...
PoreyS's user avatar
  • 286
0 votes
0 answers
142 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. ...
Jakob's user avatar
  • 1,003
0 votes
1 answer
48 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 ...
Jinwen's user avatar
  • 8,608
2 votes
3 answers
383 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 ...
Apen13's user avatar
  • 31
1 vote
2 answers
2k 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
Gim_begginer's user avatar
0 votes
2 answers
935 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 ...
Dynamic_equilibrium's user avatar
1 vote
1 answer
516 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}{...
user1850133's user avatar
  • 1,028
3 votes
1 answer
87 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} ...
Gérôme's user avatar
0 votes
2 answers
282 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 ...
Brailyn's 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 ...
user236381's user avatar
1 vote
1 answer
76 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 ...
Bhargav Rajyaguru's user avatar
4 votes
1 answer
356 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} \...
Sebastiano's user avatar
  • 56.6k
0 votes
0 answers
148 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?
bios's user avatar
  • 101
2 votes
1 answer
185 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 ...
Siddhant Khera's user avatar
1 vote
1 answer
245 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 ...
ShadowEagle's user avatar
3 votes
0 answers
357 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\...
Özgür's user avatar
  • 3,344
4 votes
1 answer
467 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} \...
kjekk's user avatar
  • 43
0 votes
0 answers
43 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 ...
G. de Man's user avatar
  • 364
2 votes
1 answer
3k 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 ...
s5s's user avatar
  • 155
1 vote
0 answers
88 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? \...
Chris Peh's user avatar
  • 320
2 votes
1 answer
292 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} \...
Chris Peh's user avatar
  • 320
1 vote
0 answers
31 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, ...
Chris Peh's user avatar
  • 320
4 votes
1 answer
167 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{...
Erwann's user avatar
  • 2,130
3 votes
2 answers
698 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 ...
electriclady's user avatar
0 votes
0 answers
169 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
2 3 4 5
7