mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
list events
This commit is contained in:
+9
-11
@@ -20,16 +20,14 @@ var weekV = new Array('Do', 'Seg', 'Terç', 'Qua', 'Qui', 'Sex', 'Sáb');
|
||||
class momentG {
|
||||
static run(date, formate , wgs){
|
||||
|
||||
if(typeof date.getMonth != 'function') {
|
||||
date = new Date(date)
|
||||
if(! date instanceof Date){
|
||||
throw new UserException('Invalid date formate momentG');
|
||||
}
|
||||
}
|
||||
|
||||
if(! date instanceof Date){
|
||||
date = new Date(date)
|
||||
}
|
||||
|
||||
let toChange = {}
|
||||
|
||||
//
|
||||
//
|
||||
|
||||
var e = {
|
||||
d : (date.getDate()).toString() ,
|
||||
@@ -40,8 +38,8 @@ class momentG {
|
||||
MM : (date.getMonth()+1).toString().padStart(2,"0"),
|
||||
HH : date.getHours().toString().padStart(2,"0"),
|
||||
yy: date.getFullYear().toString().slice(2,4).padStart(2,"0") ,
|
||||
EEEE : week[date.getDay()].padStart(2,"0") ,
|
||||
EEEEV : weekV[date.getDay()].padStart(2,"0") ,
|
||||
EEEE : week[date.getDay()].padStart(2,"0") ,
|
||||
EEEEV : weekV[date.getDay()].padStart(2,"0") ,
|
||||
MMMM : month[date.getMonth()],
|
||||
yyyy : date.getFullYear() ,
|
||||
}
|
||||
@@ -112,7 +110,7 @@ function formatDate(date, patternStr){
|
||||
.replace('ss', ss).replace('s', second)
|
||||
.replace('S', miliseconds)
|
||||
.replace('dd', dd).replace('d', day)
|
||||
|
||||
|
||||
.replace('EEEE', EEEE).replace('EEE', EEE)
|
||||
.replace('yyyy', yyyy)
|
||||
.replace('yy', yy)
|
||||
@@ -132,4 +130,4 @@ function formatDate(date, patternStr){
|
||||
|
||||
function twoDigitPad(num) {
|
||||
return num < 10 ? "0" + num : num;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user