lambdaorm-base
Advanced tools
Comparing version 1.7.3 to 1.7.4
{ | ||
"name": "lambdaorm-base", | ||
"version": "1.7.3", | ||
"version": "1.7.4", | ||
"description": "ORM", | ||
@@ -5,0 +5,0 @@ "author": "Flavio Lionel Rita <flaviolrita@proton.me>", |
@@ -49,13 +49,12 @@ "use strict"; | ||
} | ||
if (format.toLowerCase() === 'utc') { | ||
return new Date(value).toUTCString(); | ||
const _format = format.toLowerCase(); | ||
const iso = new Date(value).toISOString(); | ||
if (_format === 'utc') { | ||
return iso; | ||
} | ||
else if (_format === 'iso') { | ||
return LUXON.DateTime.fromISO(iso).toISO(); | ||
} | ||
else { | ||
const iso = new Date(value).toISOString(); | ||
if (format.toLowerCase() === 'iso') { | ||
return LUXON.DateTime.fromISO(iso).toISO(); | ||
} | ||
else { | ||
return LUXON.DateTime.fromISO(iso).toFormat(format); | ||
} | ||
return LUXON.DateTime.fromISO(iso).toFormat(format); | ||
} | ||
@@ -62,0 +61,0 @@ } |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
361607
5332