Releases: guobinhit/timekit
Releases · guobinhit/timekit
Release 1.1.1
Release 1.1.0
Supply a time toolkit names timekit
. Using timekit
, you can get some pratical functions.
Basic
- add times with days, such as
GetTimeAddDays
, if param of d is2022-04-13 10:20:30
, thenGetTimeAddDays(5)
return2022-04-18 10:20:30
. - add times with hours, such as
GetTimeAddHorus
, if param of d is2022-04-13 10:20:30
, thenGetTimeAddHorus(5)
return2022-04-13 15:20:30
. - Similarly, if we set params is negative, the result is to subtract the corresponding time.
Format
- format a time value to string, such as
FormatYyyyMmDdHhMmSs
, if param of d is2022-04-13 10:20:30
, thenFormatYyyyMmDdHhMmSs(d)
return2022-04-13 10:20:30
. - format a time value to string, such as
FormatCnYyyyMmDdHhMmSs
, if param of d is2022-04-13 10:20:30
, thenFormatCnYyyyMmDdHhMmSs(d)
return2022年04月13日 10:20:30
. - format a time value to string, such as
FormatEnYyyyMmDdHhMmSs
, if param of d is2022-04-13 10:20:30
, thenFormatEnYyyyMmDdHhMmSs(d)
return2022/04/13 10:00:00
. - format a time value to string, such as
FormatCptYyyyMmDdHhMmSs
, if param of d is2022-04-13 10:20:30
, thenFormatCptYyyyMmDdHhMmSs(d)
return20220413102030
.
Parse
- parse a string value to time, such as
ParseYyyyMmDdHhMmSs
, if param of d is2022-04-13 10:20:30
, thenParseYyyyMmDdHhMmSs(d)
return2022-04-13 10:20:30
. - parse a string value to time, such as
ParseCnYyyyMmDdHhMmSs
, if param of d is2022年04月13日 10:20:30
, thenParseCnYyyyMmDdHhMmSs(d)
return2022-04-13 10:20:30
. - parse a string value to time, such as
ParseEnYyyyMmDdHhMmSs
, if param of d is2022/04/13 10:00:00
, thenParseEnYyyyMmDdHhMmSs(d)
return2022-04-13 10:20:30
. - parse a string value to time, such as
ParseCptYyyyMmDdHhMmSs
, if param of d is20220413102030
, thenParseCptYyyyMmDdHhMmSs(d)
return2022-04-13 10:20:30
.
Release 1.0.0
DEPRECATED, PLEASE USE LATEST VERSION.