bradleypallen / doomsday Goto Github PK
View Code? Open in Web Editor NEWA Doomsday rule algorithm utility and trainer
License: MIT License
A Doomsday rule algorithm utility and trainer
License: MIT License
Hello! "It didn't work." Here's the error message:
hobbes@magic:~/src/doomsday$ ./doomsday.py
Type 'q' to quit, 0 - 6 to enter the day of the week.
February 13th, 2558? 0
Traceback (most recent call last):
File "./doomsday.py", line 214, in <module>
main()
File "./doomsday.py", line 198, in main
elif input_dow.isdigit():
AttributeError: 'int' object has no attribute 'isdigit'
Maybe I'm not using the right python or something?
doomsday.py
has a #!/usr/bin/env python
at the top, so let's check what that ends up with...
hobbes@magic:~/src/doomsday$ /usr/bin/env python --version
Python 2.7.11
Hey Bradley,
Awesome package, but I'm getting an error with certain dates:
$ doomsday dayofweek --explain 2021-01-15
Traceback (most recent call last):
File "/home/stoofin/.local/bin/doomsday", line 8, in <module>
sys.exit(cli())
File "/home/stoofin/.local/lib/python3.6/site-packages/click/core.py", line 1128, in __call__
return self.main(*args, **kwargs)
File "/home/stoofin/.local/lib/python3.6/site-packages/click/core.py", line 1053, in main
rv = self.invoke(ctx)
File "/home/stoofin/.local/lib/python3.6/site-packages/click/core.py", line 1659, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/stoofin/.local/lib/python3.6/site-packages/click/core.py", line 1395, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/stoofin/.local/lib/python3.6/site-packages/click/core.py", line 754, in invoke
return __callback(*args, **kwargs)
File "/home/stoofin/.local/lib/python3.6/site-packages/doomsday/cli.py", line 178, in dayofweek
explain_doomsmonth(date.year, date.month, date.day)
File "/home/stoofin/.local/lib/python3.6/site-packages/doomsday/cli.py", line 77, in explain_doomsmonth
print("%d %s%s a leap year, so" % (date.year, correct_tense(date, "was", "is", "will be"), "" if methods.leapyear(year) else " not")),
NameError: name 'date' is not defined
It seems to affect dates that are in January or February. Upon inspection of the code, it does seem like date
comes out outa nowhere
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.