Skip to content

Commit

Permalink
12 hour format
Browse files Browse the repository at this point in the history
  • Loading branch information
dashroshan committed Oct 4, 2023
1 parent 3d6fab1 commit 1b21f84
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion loops/contests message.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ async function notify(client) {
let mins = Math.floor((contestData['duration'] / 60) % 60);
let time = `${hours} ${hours === 1 ? 'hour' : 'hours'}${mins === 0 ? '' : (' and ' + mins + ' minutes')}`;
let date = new Date(contestData['start'] * 1000);
let formattedDate = `${date.getDate().toString().padStart(2, "0")} ${months[date.getMonth()]} at ${date.getHours().toString().padStart(2, "0")}:${date.getMinutes().toString().padStart(2, "0")} for ${hours}H:${mins.toString().padStart(2, "0")}M`;
let formattedDate = `${date.getDate().toString().padStart(2, "0")} ${months[date.getMonth()]} at ${formatAMPM(date)} for ${hours}H:${mins.toString().padStart(2, "0")}M`;
telegramStr += `\n\n[${contestData['name']}](${contestData['url']})\n🎟️ _${platforms[contestData['platform']]}\n⏰ ${formattedDate}_`;

if (i < contests.length) {
Expand Down

0 comments on commit 1b21f84

Please sign in to comment.