mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 15:13:50 +00:00
layout for form
This commit is contained in:
@@ -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('-'),
|
||||
|
Reference in New Issue
Block a user