Date format: Difference between revisions
Content added Content deleted
(add RPL) |
|||
Line 3,214: | Line 3,214: | ||
2020-07-19 |
2020-07-19 |
||
Sunday, July 19, 2020 |
Sunday, July 19, 2020 |
||
</pre> |
|||
=={{header|RPL}}== |
|||
RPL can return the date as a floating point number (format dd.mmyyyy) and can convert it (along with the time) as a string (format "DAY dd.mm.yy hh.mm.ss") |
|||
To solve the task, some formatting is then needed. |
|||
{{works with|HP|48}} |
|||
≪ DATE DUP 1000000 * 10000 MOD "-" + |
|||
OVER FP 100 * IP + "-" + |
|||
SWAP IP + |
|||
≫ '<span style="color:blue">DTSHORT</span>' STO |
|||
≪ { "Monday" "Tuesday" "Wednesday" "Thursday" "Friday" "Saturday" "Sunday" } |
|||
{ "MON" "TUE" "WED" "THU" "FRI" "SAT" "SUN" } |
|||
DATE TIME TSTR 1 3 SUB POS GET ", " + |
|||
{ "January" "February" "March" "April" "May" "June" "July" "August" "September" "October" "November" "December"} |
|||
DATE FP 100 * IP GET + " " + |
|||
OVER IP + ", " + |
|||
DATE 1000000 * 10000 MOD + |
|||
≫ '<span style="color:blue">DTLONG</span>' STO |
|||
{{out}} |
|||
<pre> |
|||
2: "2023-8-17" |
|||
1: "Thursday, August 17, 2023" |
|||
</pre> |
</pre> |
||