s-date
Advanced tools
Comparing version 1.4.0 to 1.4.1
10
index.js
@@ -196,8 +196,8 @@ 'use strict'; | ||
const regex = /\{yyyy\}|\{yy\}|\{m\}|\{mm\}|\{Month\}|\{Mo\}|\{d\}|\{dd\}|\{ds\}|\{Weekday\}|\{Day\}|\{Dy\}|\{D\}|\{h24\}|\{hh24\}|\{h\}|\{hh\}|\{ampm\}|\{AMPM\}|\{Minutes\}|\{Seconds\}/g; | ||
var regex = /\{yyyy\}|\{yy\}|\{m\}|\{mm\}|\{Month\}|\{Mo\}|\{d\}|\{dd\}|\{ds\}|\{Weekday\}|\{Day\}|\{Dy\}|\{D\}|\{h24\}|\{hh24\}|\{h\}|\{hh\}|\{ampm\}|\{AMPM\}|\{Minutes\}|\{Seconds\}/g; | ||
return format | ||
.replace(regex, function(match) { | ||
return map[match](date); | ||
}); | ||
return format.replace(regex, function(match) { | ||
return map[match](date); | ||
}); | ||
}; |
{ | ||
"name": "s-date", | ||
"version": "1.4.0", | ||
"version": "1.4.1", | ||
"description": "Tiny date/time formatter", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
20282
406