codinasion-archive / codinasion-monorepo

Community Monorepo
https://codinasion.org
MIT License
52 stars 167 forks source link

Write a Ruby program to convert standard date format to julian date and vice-versa #5477

Closed harshraj8843 closed 7 months ago

harshraj8843 commented 8 months ago

Description

Write a Ruby program to convert standard date format to julian date and vice-versa

A Julian date is a way of displaying a date that combines the current year with the number of days since the beginning of the year. For example, January 1, 2007 is 2007001, and December 31, 2007 is 2007365.

The first two digits of a Julian date represent the year, and the last three digits represent the number of days since the beginning of the year. For example, 21-001 represents January 1, 2021, and 22-165 represents June 14, 2022.

Example

Input  : 2023-06-10
Output : 2023160

Contributed by - @magar51

How to contribute - Comment `!assign` to assign this issue to yourself - Fork this repository - Create a new branch - Save the solution in `program/program/convert-standard-date-format-to-julian-date-and-vice-versa/ConvertStandardDateFormatToJulianDateAndVice-versa.rb` - Commit the changes - Create a pull request
pranavsilimkhan commented 7 months ago

!assign

codinasion-bot[bot] commented 7 months ago

Hey @pranavsilimkhan, this issue is already assigned to @anandfresh! cc/ @codinasion/codinasion