Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions _extensions/scheduled-docs/scheduled-docs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,12 @@ function convertDateToISOFormat(dateStr: string, timezone: string): string {
return `20${year}-${month}-${day}T00:00:00${timezone}`;
}

//To do - see if you can write a handler that can take locale instead of offset
function convertDateToISOFormat2(dateStr: string, timezone: string): string {
const [month, day, year] = dateStr.split('/').map(num => num.padStart(2, '0'));
return `20${year}-${month}-${day}T00:00:00${timezone}`;
}

function deepCopy(obj) {
if (obj === null || typeof obj !== 'object') {
return obj;
Expand Down