UNPKG
llearn
Version:
latest (0.1.6)
0.1.6
0.1.5
0.1.4
0.1.3
0.1.1
0.0.12
0.0.10
0.0.9
0.0.8
0.0.7
Bad-ass developers create awesome apps
github.com/perezLamed/lamed_learn
perezLamed/lamed_learn
llearn
/
templates
/
JSN
/
js
/
string
/
string_fromDate.js
10 lines
(9 loc)
•
286 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
/* Add new date 2 str method */
Date
.
prototype
.
yyyymmdd
=
function
(
) {
var
mm =
this
.
getMonth
() +
1
;
// getMonth() is zero-based
var
dd =
this
.
getDate
();
return
[
this
.
getFullYear
(), (mm>
9
?
''
:
'0'
) + mm, (dd>
9
?
''
:
'0'
) + dd ].
join
(
'/'
); };