1
0
Fork 0
mirror of synced 2024-08-08 14:48:13 +12:00

string dates

This commit is contained in:
Gerard Burns 2024-04-22 07:23:30 +01:00
parent d9e7202e3b
commit f629b95605

View file

@ -55,7 +55,7 @@
</ExampleLine>
</ExampleSection>
<Section>
An <Block>ISO 8601</Block> datetime string. which is the number of milliseconds since Jan 1st 1970. A more recent moment in time will be a higher number.
An <Block>ISO 8601</Block> datetime string, which represents an exact moment in time as well as the potentional to store the timezone it occured in.
</Section>
<div class="isoExamples">
<ExampleSection
@ -63,21 +63,21 @@
>
<ExampleLine>
<Block>2000-01-01T00:00:00.000Z</Block>
<span class="separator">{"->"}</span>
<span class="separator"></span>
<Block>
{(new Date(946684800000).toLocaleString())}
</Block>
</ExampleLine>
<ExampleLine>
<Block>2000-01-01T00:00:00.000Z</Block>
<span class="separator">{"->"}</span>
<span class="separator"></span>
<Block>
{(new Date(1577836800000).toLocaleString())}
</Block>
</ExampleLine>
<ExampleLine>
<Block>{iso}</Block>
<span class="separator">{"->"}</span>
<span class="separator"></span>
<Block>Now</Block>
</ExampleLine>
</ExampleSection>
@ -87,15 +87,18 @@
<style>
.separator {
flex-shrink: 0;
margin: 0 5px;
}
.isoExamples :global(.block) {
word-break: break-all;
}
.isoExamples :global(.exampleLine) {
align-items: center;
flex-direction: column;
margin-bottom: 16px;
width: 162px;
}
</style>