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

Proposal for new Pendulum methods for weekday numbering systems #63

Closed
danilobellini opened this issue Oct 27, 2016 · 1 comment
Closed

Comments

@danilobellini
Copy link

Today, Pendulum objects have the weekday and the isoweekday methods that shows the first 2 lines of this Wikipedia table:

Line M T W T F S S
1    1 2 3 4 5 6 7
2    0 1 2 3 4 5 6
3    2 3 4 5 6 7 1
4    1 2 3 4 5 6 0

About each line, Wikipedia tells us:

  1. ISO 8601, usage: %_ISODOWI%, %@ISODOWI[]% (4DOS); DAYOFWEEK() (HP Prime)
  2. No more info at Wikipedia
  3. Usage: %NDAY OF WEEK% (NetWare, DR-DOS); %_DOWI%, %@DOWI[]% (4DOS)
  4. Usage: HP financial calculators

I think it would be useful more 2 methods, namely dosweekday and hpweekday, including that 3rd and 4th lines. Usually Brazilian people think on the weekday as the dosweekday (3rd line), since the day names follows our numbering system (e.g. "second day" = "segundo dia", and "monday" = "segunda").

I know that it's actually possible with things like dt.isoweekday() % 7 + 1 (3rd line), but maybe that could be part of the library. =)

@sdispater
Copy link
Collaborator

This is something that will likely never be added to Pendulum since there are workarounds to do it, so I am closing this.

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

No branches or pull requests

2 participants