You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import { format, parse } from "date-fns";
import uk from "date-fns/locale/uk";
const locale = { locale: uk };
const dateIn = new Date("August 3, 2002 03:24:50");
const formatStyle = "d MMM y 'р'.";
const formatted = format(dateIn, formatStyle, locale); // 3 серп. 2002 р.
const parsed = parse(formatted, formatStyle, new Date(), locale); //Invalid Date
Failling dates/months:
new Date("March 3, 2002 03:24:50");
new Date("September 3, 2002 03:24:50");
new Date("April 3, 2002 03:24:50");
new Date("June 3, 2002 03:24:50");
new Date("August 3, 2002 03:24:50");
new Date("September 3, 2002 03:24:50");
new Date("Octomber 3, 2002 03:24:50");
The text was updated successfully, but these errors were encountered:
vadimpopa
changed the title
parse "d MMM y 'р'." date for Ukrainian locale returns invalid date
parsing dates with MMM for Ukrainian returns invalid dates
Jul 27, 2022
Test Code:
Failling dates/months:
The text was updated successfully, but these errors were encountered: