layout for form

This commit is contained in:
2021-06-21 13:38:43 +02:00
parent aa4a9e874a
commit 40fcb09082
16 changed files with 516 additions and 78 deletions

View File

@@ -11,9 +11,12 @@
*
* Do not take time into account
*
* **Experimental**
*/
const dateToISO = (date) => {
if (null === date) {
return null;
}
return [
date.getFullYear(),
(date.getMonth() + 1).toString().padStart(2, '0'),
@@ -36,10 +39,12 @@ const ISOToDate = (str) => {
/**
* Return a date object from iso string formatted as YYYY-mm-dd:HH:MM:ss+01:00
*
* **Experimental**
*/
const ISOToDatetime = (str) => {
console.log(str);
if (null === str) {
return null;
}
let
[cal, times] = str.split('T'),
[year, month, date] = cal.split('-'),