Skip to content
This repository has been archived by the owner on Feb 14, 2019. It is now read-only.

Commit

Permalink
Added "t" as a format option. Gets replaced with the milliseconds sin…
Browse files Browse the repository at this point in the history
…ce the epoch, such as is returned by Date.getTime()
  • Loading branch information
Christian Vaas committed Jan 26, 2016
1 parent 08e35e8 commit 5521adf
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion js/bootstrap-datetimepicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -1452,7 +1452,7 @@
},
validParts: function (type) {
if (type == 'standard') {
return /hh?|HH?|p|P|ii?|ss?|dd?|DD?|mm?|MM?|yy(?:yy)?/g;
return /t|hh?|HH?|p|P|ii?|ss?|dd?|DD?|mm?|MM?|yy(?:yy)?/g;
} else if (type == 'php') {
return /[dDjlNwzFmMnStyYaABgGhHis]/g;
} else {
Expand Down Expand Up @@ -1614,6 +1614,7 @@
var val;
if (type == 'standard') {
val = {
t: date.getTime(),
// year
yy: date.getUTCFullYear().toString().substring(2),
yyyy: date.getUTCFullYear(),
Expand Down

0 comments on commit 5521adf

Please sign in to comment.