@cosmicjs/blocks
Advanced tools
Comparing version 1.3.2 to 1.3.3
@@ -7,3 +7,3 @@ { | ||
}, | ||
"version": "1.3.2", | ||
"version": "1.3.3", | ||
"description": "Blocks CLI", | ||
@@ -10,0 +10,0 @@ "main": "index.js", |
@@ -7,2 +7,24 @@ import { clsx, type ClassValue } from "clsx" | ||
} | ||
export const getFormattedDateFromString = (inputDate: string) => { | ||
const dateParts = inputDate.split("-") | ||
const year = parseInt(dateParts[0]) | ||
const month = parseInt(dateParts[1]) - 1 | ||
const day = parseInt(dateParts[2]) | ||
// Create a new Date object using UTC timezone | ||
const date = new Date(Date.UTC(year, month, day)) | ||
// Format the date in UTC | ||
const formattedDate = date.toLocaleDateString("en-US", { | ||
timeZone: "UTC", | ||
year: "numeric", | ||
month: "long", | ||
day: "numeric", | ||
}) | ||
return formattedDate | ||
} | ||
export function getFormattedDate( | ||
@@ -9,0 +31,0 @@ date: Date, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
241545
6794