Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lunar Month support in Intl.DateTimeFormat() #538

Open
xkeshav opened this issue Oct 4, 2024 · 0 comments
Open

Lunar Month support in Intl.DateTimeFormat() #538

xkeshav opened this issue Oct 4, 2024 · 0 comments

Comments

@xkeshav
Copy link

xkeshav commented Oct 4, 2024

I want to support indian calendar which follow lunar months ;
currently it does not support and having no option.

what I am using currently

// Use Intl to get the current Gregorian date in Hindi
const indian = {
  weekday: 'long',
  year: 'numeric',
  month: 'long',
  day: '2-digit',
  calendar: 'indian',  // Indian calendar (though it doesn't give lunar tithi)
  timeZone: 'Asia/Kolkata',
  numberingSystem: 'deva',  // Devanagari numerals
};

const currentDate = new Intl.DateTimeFormat("hi-IN", indian);

but it return date as 16 while in Lunar Month there are 15 days only and there are 2 seprate Paksha name as Shuka and Krishna
for more information you can refer hindu calendar wiki page

so my proposal is can we have the support of Lunar calendar?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant