Crates.io | ndate |
lib.rs | ndate |
version | 0.1.0 |
source | src |
created_at | 2021-07-07 16:53:03.669724 |
updated_at | 2021-07-07 16:53:03.669724 |
description | This is a program that gives the current Nepali date (Bikram Sambhat date), converts Bikram Sambhat to AD date and vice versa. |
homepage | |
repository | |
max_upload_size | |
id | 419949 |
size | 23,790 |
This is a CLI program that gives the current Nepali date (Bikram Sambhat date), converts Bikram Sambhat to AD date and vice versa.
ndate command can be used to retrieve current Nepali date. Options available are -a and -b where -a converts Bikram Sambhat date to AD date and -b converts AD date to Bikram Sambhat date.
Below are some examples
Above command gives the current Nepali date. output = 2078-03-13
Above command converts 1985-9-9 (yyyy-m-d) to Bikram Sambhat date. output = 2042-05-24
Above command converts 2042-5-25 (yyyy-m-d) to AD date. output = 1985-09-09
Nepali Month can vary from 29 days to 32 days, and they are not fixed so there is not any fixed algorithm to crack the number of days in a nepali month for a particular year, therefore starting from 1970 BS to 2090 BS the number of months are hardcoded. Credit to https://github.com/medic/bikram-sambat for the hardcoded data range (1970 - 2090 BS).
User can download the source code and build it using cargo build and run it using cargo run command if rust is installed in the system, or user can directly download the binary provided which will be available soon for various devices and can directly execute the binary.
Swoven Pokharel: swovenpokharel@gmail.com