Comments (2)
Simple 2-folder structure
/cmd
/nepcal <-- binary
main.go
/nepcal <-- root package
conv.go <-- conversion stuff
time.go <-- particular utility methods with the BS dates
The cmd/
folder would just be the current main package and the nepcal
package would be the brains of it all.
nepcal
package and relevant changes
- Model it after the
time
package. - There will be a central
Time
struct off of which we attach methods for all utilities. This should be fine because everything will be namespaced by the package namenepcal.Time
- Any functions that aren't methods of the
Time
struct will (probably only) be constructors to create the structure.- For e.g the time.Date function will similarly be implemented as
nepcal.Date
with the same API. The caller does the extra business of argparsing, which is already the case. - Similarly, the
nepcal.Unix
function can be a similar equivalent. - This imposes certain limitations as we cannot have functions to ask the package "What is the BS equivalent weekday of Wednesday?". This is probably silly to ask anyway. The struct can still expose the weekday.
- Change functions like
totalDaysSpannedUntilDate
to be implemented using methods
- For e.g the time.Date function will similarly be implemented as
from nepcal.
Fixed in v1.0.0.
from nepcal.
Related Issues (20)
- Independence from the epoch type
- A hack to prevent panic on CI.
- Change the package so that it returns the grpc server rather than being a main p...
- Do not use time.Date to convert BS dates HOT 3
- Highlight current date when using nepcal d HOT 1
- Convert calendar dates into nepali numerals HOT 2
- nepcal global options are not working HOT 1
- Avoid panicking on dates that underflow or overflow the acceptable range HOT 1
- Better tabwriter
- Convert BS to AD HOT 4
- Release to OS specific package repositories HOT 1
- Show calendar weekdays in Nepali HOT 6
- Move calendar generation logic into nepcal package HOT 1
- Network access to library features HOT 1
- Use link time variables for versioning (release script) HOT 1
- Can we have a pypi package of this application? HOT 1
- Calling bottle :unneeded is deprecated HOT 5
- Month max day not validated HOT 1
- Date normalization strategy
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nepcal.