How to resolve the algorithm Show the epoch step by step in the REXX programming language
Published on 12 May 2024 09:40 PM
How to resolve the algorithm Show the epoch step by step in the REXX programming language
Table of Contents
Problem Statement
Choose popular date libraries used by your language and show the epoch those libraries use. A demonstration is preferable (e.g. setting the internal representation of the date to 0 ms/ns/etc., or another way that will still show the epoch even if it is changed behind the scenes by the implementers), but text from (with links to) documentation is also acceptable where a demonstration is impossible/impractical. For consistency's sake, show the date in UTC time where possible.
Let's start with the solution:
Step by Step solution about How to resolve the algorithm Show the epoch step by step in the REXX programming language
Source code in the rexx programming language
/*REXX program displays the number of days since the epoch for the DATE function (BIF). */
say ' today is: ' date() /*today's is format: mm MON YYYY */
days=date('Basedate') /*only the first char of option is used*/
say right(days, 40) " days since the REXX base date of January 1st, year 1"
say ' and today is: ' date(, days, "B") /*it should still be today (µSec later)*/
/* ↑ ┌───◄─── This BIF (Built-In Function) is only */
/* └─────────◄──────┘ for newer versions of REXX that */
/* support the 2nd and 3rd arguments. */
You may also check:How to resolve the algorithm Active Directory/Connect step by step in the Rust programming language
You may also check:How to resolve the algorithm Percolation/Mean run density step by step in the Mathematica/Wolfram Language programming language
You may also check:How to resolve the algorithm Sutherland-Hodgman polygon clipping step by step in the C# programming language
You may also check:How to resolve the algorithm Roots of a function step by step in the CoffeeScript programming language
You may also check:How to resolve the algorithm Comments step by step in the Wren programming language