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

Applet Suggestion: cal #39

Open
AndroidKitKat opened this issue Feb 11, 2020 · 2 comments
Open

Applet Suggestion: cal #39

AndroidKitKat opened this issue Feb 11, 2020 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@AndroidKitKat
Copy link
Member

Description of functionality

Replacement of cal command

Proposed flags

Usage: cal [general options] [-hjy] [[month] year]
cal [general options] [-hj] [-m month] [year]
ncal [general options] [-hJjpwy] [-s country_code] [[month] year]
ncal [general options] [-hJeo] [year]
General options: [-NC3] [-A months] [-B months]

Add a list of flags and functionality here if any.

@AndroidKitKat AndroidKitKat added the enhancement New feature or request label Feb 11, 2020
@kwjw
Copy link
Contributor

kwjw commented Mar 9, 2020

I'm working on cal now, modeling it off of GNU.

Here's my plan:

I'm going to use the proleptic Gregorian calendar exclusively for now, as it makes the reasoning a lot easier. This will mean some of the GNU flags won't work, and output for months prior to October 1752 will be different from other implementations.

I'm also going to ignore highlighting the current day and will stick to pure ASCII output.

I hope that working on this applet might be a springboard for working on a date and time library for Zig. There are way too many considerations when it comes to a full, robust implementation of dates and times (timezones, leap seconds, etc.), but I think it's 100% doable to implement a subset of Python's idealized "datetime," which assumes no leap seconds and proleptic Gregorian calendar.

@kwjw
Copy link
Contributor

kwjw commented Mar 9, 2020

Also, it will ignore locale/language, etc. since I want to just hardcode in a lot of stuff rather than write a whole library for spacing strings

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants