mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-31 10:26:08 +01:00 
			
		
		
		
	create months and days with associated english names, closes #37
This commit is contained in:
		| @@ -47,7 +47,7 @@ function dateStr(date) { | ||||
|  * @param str - needs to be in the ISO 8601 format "YYYY-MM-DDTHH:MM:SS.sssZ" format as outputted by dateStr(). | ||||
|  *              also is assumed to be GMT time (as indicated by the "Z" at the end), *not* local time | ||||
|  */ | ||||
| function parseDate(str) { | ||||
| function parseDateTime(str) { | ||||
|     try { | ||||
|         return new Date(Date.parse(str)); | ||||
|     } | ||||
| @@ -56,6 +56,12 @@ function parseDate(str) { | ||||
|     } | ||||
| } | ||||
|  | ||||
| function parseDate(str) { | ||||
|     const datePart = str.substr(0, 10); | ||||
|  | ||||
|     return parseDateTime(datePart + "T12:00:00.000Z"); | ||||
| } | ||||
|  | ||||
| function toBase64(plainText) { | ||||
|     return Buffer.from(plainText).toString('base64'); | ||||
| } | ||||
| @@ -117,6 +123,7 @@ module.exports = { | ||||
|     nowDate, | ||||
|     dateStr, | ||||
|     parseDate, | ||||
|     parseDateTime, | ||||
|     newNoteId, | ||||
|     newNoteTreeId, | ||||
|     newnoteRevisionId, | ||||
|   | ||||
		Reference in New Issue
	
	Block a user