nicer time
This commit is contained in:
parent
4d2109008b
commit
12d2982c67
|
@ -36,6 +36,6 @@
|
||||||
<style>
|
<style>
|
||||||
.explanationModalContent {
|
.explanationModalContent {
|
||||||
max-width: 300px;
|
max-width: 300px;
|
||||||
padding: 16px 12px 6px;
|
padding: 16px 12px 0px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -68,15 +68,15 @@
|
||||||
/>
|
/>
|
||||||
</Property>
|
</Property>
|
||||||
{:else if schema.type === "formula"}
|
{:else if schema.type === "formula"}
|
||||||
<Property
|
|
||||||
name="Formula type"
|
|
||||||
value={schema?.formulaType === "dynamic" ? "Dynamic" : "Static"}
|
|
||||||
/>
|
|
||||||
<Property name="Formula">
|
<Property name="Formula">
|
||||||
<BindingValue
|
<BindingValue
|
||||||
value={schema?.formula}
|
value={schema?.formula}
|
||||||
/>
|
/>
|
||||||
</Property>
|
</Property>
|
||||||
|
<Property
|
||||||
|
name="Formula type"
|
||||||
|
value={schema?.formulaType === "dynamic" ? "Dynamic" : "Static"}
|
||||||
|
/>
|
||||||
{/if}
|
{/if}
|
||||||
<Property
|
<Property
|
||||||
name="Required"
|
name="Required"
|
||||||
|
|
|
@ -1,9 +1,40 @@
|
||||||
<script>
|
<script>
|
||||||
import { Subject, Section } from './components'
|
import { onMount } from "svelte"
|
||||||
|
import { Block, Subject, Section } from './components'
|
||||||
|
|
||||||
|
let timestamp = Date.now();
|
||||||
|
|
||||||
|
onMount(() => {
|
||||||
|
let run = true;
|
||||||
|
|
||||||
|
const updateTimeStamp = () => {
|
||||||
|
timestamp = Date.now();
|
||||||
|
console.log(timestamp);
|
||||||
|
if (run) {
|
||||||
|
setTimeout(updateTimeStamp, 200)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
updateTimeStamp();
|
||||||
|
|
||||||
|
return () => {
|
||||||
|
run = false;
|
||||||
|
}
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<Subject heading="Dates as Numbers">
|
<Subject heading="Dates as Numbers">
|
||||||
<Section>
|
<Section>
|
||||||
A date can be used in place of a numeric value, but it will be parsed as a UNIX epoch timestamp, which is the number of milliseconds since Jan 1st 1970.
|
A date can be used in place of a numeric value, but it will be parsed as a UNIX epoch timestamp, which is the number of milliseconds since Jan 1st 1970. A more recent Date/Time will be a higher number.
|
||||||
|
</Section>
|
||||||
|
|
||||||
|
<Section>
|
||||||
|
Examples:
|
||||||
|
<br />
|
||||||
|
1st Jan 2000: <Block>946684800000</Block>
|
||||||
|
<br />
|
||||||
|
1st Jan 2020: <Block>1577836800000</Block>
|
||||||
|
<br />
|
||||||
|
Now: <Block>{timestamp}</Block>
|
||||||
</Section>
|
</Section>
|
||||||
</Subject>
|
</Subject>
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
<style>
|
<style>
|
||||||
.property {
|
.property {
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
margin-bottom: 5px;
|
margin-bottom: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.truncate {
|
.truncate {
|
||||||
|
@ -31,13 +31,13 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.propertyName {
|
.propertyName {
|
||||||
font-style: italic;
|
font-weight: 600;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.propertyDivider {
|
.propertyDivider {
|
||||||
padding: 0 6px;
|
padding: 0 2px;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue