Formats of the date command
Write a format, or click the codes below: the preview shows what date +FORMAT prints, as GNU date does, and the tool gives the command, with the codes that only exist on Linux.
Command
For this moment, on Linux (GNU)
For this moment, on macOS (BSD)
In a crontab (each % becomes \%)
Codes: click to insert
Marked GNU: Linux only. Between % and the letter, GNU date also accepts - (no padding), _ (spaces), 0 (zeros), ^ (capitals) and a width: %-d, %_H, %^B, %3N.
Date
Time
Names
Weeks
Time zone
Other
Transparency
The preview is computed in your browser, by the scripts listed below. Nothing you type leaves this page.
- Enforced by your browser
- This page's Content Security Policy allows a single destination, the site's audience measurement (
connect-src https://stats.r-no.fr, see below), and forbids any form submission (form-action 'none'), so even a bug could not send what you type anywhere. You can read the policy at the top of the page source. - Audience measurement
- Like every page of the site, this one counts its visit with Umami, installed on R-no’s own server (
stats.r-no.fr). It receives the address of the page, without parameters or anchor, the site you came from (its domain only), your browser, system, language and screen size, and the country, region and city deduced from your IP address, which is not kept. It never receives what you type, nor the result of the tool. No cookie, nothing stored in your browser; if your browser asks not to be tracked (Do Not Track), nothing is measured. The data is erased after 25 months.- /commun/mesure.js: the filter applied before each sending, written for R-no Toolbox. 1.4 kB
SHA-256225eec74fd12623d82fc05ee7d222be629ce454d081c129e8d1e249ed37ee716 - https://stats.r-no.fr/m.js: Umami’s tracker, open source (MIT), served by the measurement server. Its fingerprint is not shown here: it changes with each version of Umami, and you cannot check from your browser that it is the published code. For that part, you have to trust R-no.
- /commun/mesure.js: the filter applied before each sending, written for R-no Toolbox. 1.4 kB
- What is stored
- No cookie, and nothing in the address. What you type is never stored: it disappears when you reload or close the page. Your language is given by the address itself (
/en/or/fr/): nothing is stored to remember it. Like any website, the server records the download of the page and its files in its access logs (IP address, date and time, address requested, browser name). It never receives what you type. - Code that runs here
-
- app.js: the formatting, as GNU date does it, and the commands, written for R-no Toolbox. Not minified, no third-party library. 17.3 kB
SHA-2568914166b2564d111bc22da6bfa448aabc0b56a5b99f12b9602380ce9968d0170 - textes.js: the French messages of the tool, shown by its script (the rest of the French page is written into its HTML when the site is built). It only defines texts, with no logic. 7.2 kB
SHA-25622e76801922a2b98c29a3b1ba34a47416792b34eb0f7e9be35073375b8b9a8af - /commun/langue.js: the language helper, the same on every page of the site. It reads the language of the page and gives the tool its messages in that language. It stores nothing. 1.6 kB
SHA-25680f76f69773ef628d36d09bf8387cfedebda4529210d7120649b6f5603310631
- app.js: the formatting, as GNU date does it, and the commands, written for R-no Toolbox. Not minified, no third-party library. 17.3 kB
- Before you paste
- This page only writes text: it runs nothing, neither here nor on your machine. What you paste into a terminal or a configuration file runs with your rights, so read it first. The code it writes downloads nothing and calls no outside service.
- How it was checked
- Every code and flag above was compared with GNU date (coreutils 9, glibc) on 314 moments between 1970 and 2033, in four time zones (UTC, Paris, New York, Kolkata) and in the C and fr_FR locales: 2,512 identical results, including the quirk of
^, which leaves accented letters in lower case (FéVRIER). - Check it yourself
- Download a script and compare its fingerprint with the one above:
curl -s https://r-no.fr/linux/date/app.js | shasum -a 256 - Limits
%Zshows the name your browser gives the time zone (oftenGMT+2), where the system writesCEST.%Nonly has millisecond precision here. The French names are those of recent glibc versions; another system may abbreviate differently. On macOS, the codes marked GNU print something else, or nothing.