https://www.npmjs.com/package/astronomy-date-formatter
astronomy-date-formatter
is a JavaScript package designed to format dates using astronomical themes. It supports various themes such as zodiac signs and lunar phases. The package integrates real lunar calculations for enhanced date formatting.
- Zodiac-based date formatting.
- Lunar phase formatting.
- Customizable themes for different astronomical references.
You can install astronomy-date-formatter
using npm:
npm install astronomy-date-formatter
Formats the given date based on the specified theme.
-
Parameters:
-
date
(Date): The date to format. -
theme
(string): The theme to apply ('zodiac'
or'lunar'
).
-
-
Returns:
- string: Formatted date string.
-
zodiac
: Formats the date based on zodiac signs. -
lunar
: Formats the date based on lunar phases.
const formattedZodiacDate = formatWithTheme(new Date(), 'zodiac');
console.log(formattedZodiacDate); // "20th Sol of Sagittarius 2024"
const formattedLunarDate = formatWithTheme(new Date(), 'lunar');
console.log(formattedLunarDate); // "Lunar Phase: Full Moon"
Contributions to this package are welcome! If you find a bug or have an enhancement idea, please feel free to submit an issue or pull request.
- Fork the repository. https://github.com/KAXUN01/Astronomy-Date-Formatter
- Create a new branch (
git checkout -b feature-branch
). - Make your changes and commit them (
git commit -m 'Add new feature'
). - Push to the branch (
git push origin feature-branch
). - Open a pull request.
This project is licensed under the MIT License. See the LICENSE file for more information.