Socket
Socket
Sign inDemoInstall

gerimismalamsenin

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gerimismalamsenin

Project abal2


Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

Convert Gregorian Date To Chinese Lunar dan Moslem's Hijri

  • The code uses the commander library for parsing command-line arguments.
  • It defines a program with a version number and expects a Gregorian date as an argument.
  • The action function parses the provided date string and validates its format (YYYY-MM-DD).
  • It uses chinese-lunar-calendar to convert the Gregorian date to Chinese Lunar date.
  • It uses hijri-converter to convert the Gregorian date to Islamic Hijri date.
  • The code outputs the original Gregorian date, the converted Chinese Lunar date with year, month text, and day text, and the converted Islamic Hijri date with day, month, year, and "AH" (After Hijra).
  • The isValidGregorianDate function performs basic date validation (month range, day range within month).
  • The getDaysInMonth function returns the number of days in a month (ignoring leap years for simplicity).

How To Use?

  1. Run the script with a Gregorian date argument: node dateConverter.js 2024-05-17
  2. The script will output the converted Chinese Lunar and Islamic Hijri date

FAQs

Package last updated on 16 May 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc