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

methods return array #43

Closed
wants to merge 4 commits into from
Closed

methods return array #43

wants to merge 4 commits into from

Conversation

AhmadMrf
Copy link

@AhmadMrf AhmadMrf commented Nov 26, 2022

methods return array instead of object , for easier destructuring

jalaali.toJalaali(2016, 4, 11) // [1395, 1, 23 ]
jalaali.toGregorian(1395, 1, 23) // [ 2016, 4, 11 ]
jalaali.jalaaliWeek(1400, 4, 30) // { saturday: [ 1400,  4,  26 ], friday: [ 1400,  5, 1 ] }
let [year, month, day] = jalaali.toJalaali(2016, 4, 11)

methods return array[year,month,day] instead of object{jy,jm,jd} , for easier destructuring.
methods return array instead of object , for easier destructuring
@AhmadMrf AhmadMrf changed the title Patch 1 methods return array Nov 26, 2022
@behrang
Copy link
Member

behrang commented Jan 8, 2023

Hey, thanks for the pull request. However, this change breaks users' code that is already using these functions. So, I have to reject it.

@behrang behrang closed this Jan 8, 2023
@AhmadMrf AhmadMrf deleted the patch-1 branch January 19, 2023 10:21
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

Successfully merging this pull request may close these issues.

2 participants