-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* remove moment.js * up HISTORY.md * use constant var * upgrade rmc-picker * add test, remove unused code * fix setMonth * add use12Hours support * fix use12Hours, ref ant-design/ant-design-mobile#1578 * improve HISTORY
- Loading branch information
1 parent
c86e433
commit 30d4f3f
Showing
17 changed files
with
935 additions
and
262 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
|
||
export const minDate = new Date(2015, 8, 15, 10, 30, 0); | ||
export const maxDate = new Date(2018, 1, 1, 23, 49, 59); | ||
export let now = new Date(); | ||
|
||
export const cn = typeof location !== 'undefined' ? location.search.indexOf('cn') !== -1 : false; | ||
if (cn) { | ||
now = new Date(); | ||
} else { | ||
now = new Date(now.getTime() + now.getTimezoneOffset() * 60000); | ||
} | ||
|
||
export function format(date) { | ||
let mday = date.getDate(); | ||
let month = date.getMonth() + 1; | ||
month = month < 10 ? `0${month}` : month; | ||
mday = mday < 10 ? `0${mday}` : mday; | ||
return `${date.getFullYear()}-${month}-${mday} ${date.getHours()}:${date.getMinutes()}`; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.