Year-Season-Attachments

Updated mklink for new version and directory creation
Epoch Testing
This commit is contained in:
2025-01-06 13:46:00 -07:00
parent 7f1f149eac
commit 4b85f8807d
3 changed files with 44 additions and 14 deletions

View File

@ -16,12 +16,34 @@
// console.log("dateText: " + dateText);
// DateTime utcMeDateTime = new(1980, 1, 17, 0, 0, 0, DateTimeKind.Utc);
// long meTotalSeconds = (long)Math.Floor(fileInfo.LastWriteTime.ToUniversalTime().Subtract(utcMeDateTime).TotalSeconds);
let date = new Date();
let timezoneOffset = date.getTimezoneOffset();
let seconds = date.getTime().valueOf() + timezoneOffset;
let now = new Date();
let start = new Date(now.getFullYear(), 0, 0);
let diff = (now - start) + ((start.getTimezoneOffset() - now.getTimezoneOffset()) * 60 * 1000);
let oneDay = 1000 * 60 * 60 * 24;
let day = Math.floor(diff / oneDay);
console.log('Day of year: ' + day);
var season = now.getFullYear() + "-";
if (day < 78)
season = season + "0.Winter";
else if (day < 124)
season = season + "1.Spring";
else if (day < 171)
season = season + "2.Spring";
else if (day < 217)
season = season + "3.Summer";
else if (day < 264)
season = season + "4.Summer";
else if (day < 309)
season = season + "5.Fall";
else if (day < 354)
season = season + "6.Fall";
else
season = season + "7.Winter";
let timezoneOffset = now.getTimezoneOffset();
let seconds = now.getTime().valueOf() + timezoneOffset;
let epoch = seconds * 10000;
let ticks = epoch + 621355968000000000;
let dateText = seconds + " - " + ticks + " - " + date.toString();
let dateText = seconds + " - " + ticks + " - " + now.toString();
console.log("dateText: " + dateText);
console.log("end");
// epoch: 25201000
@ -30,4 +52,4 @@ console.log("end");
// Now - To: 638665132334594771
// 638665135325760000
// 638665136814890000
// utc1970DateTime: 621355968000000000
// utc1970DateTime: 621355968000000000