-
Notifications
You must be signed in to change notification settings - Fork 25
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
FIN!! 🗽🗽🗽🗽 #25
base: main
Are you sure you want to change the base?
FIN!! 🗽🗽🗽🗽 #25
Conversation
Implement Done
Implement Done
เป็น PR สุดท้ายที่สวยงามมากครับ ไม่ต้องแก้อะไรเลย น้ำตาจิไหล |
import datetime #datetime | ||
import xml.etree.ElementTree as ET #xml reader | ||
from time import perf_counter #stopwatch | ||
from dateutil.relativedelta import relativedelta #timedelta |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a non standard library
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with this mistake, maybe it came from installing some data sci lib for another project.
when we use this command and get no error so we accidentally decided to use it , sorry for the MISUNDERSTANDING.
ps. After I search for a while. The PYTHON standard date/datetime lib cannot calculate date difference with YEARS (unable to process 4year 1day rule) then it is impossible to do so
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please give me the link
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please give me the link
@annibuliful follow python's official documentation, the built-in lib datetime is not provided YEARS parameter with timedelta function
https://docs.python.org/3/library/datetime.html#datetime.timedelta
and One question please about scoring criteria
In date precision..
The participants should be concern about add extra 1day for every 4years pass or not ? for exactly date!
Cuz if some participant use "year" to minus with year value directly that might be some deviation on "day"/"month" value
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I checked from another team it seems work with standard lib
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I checked from another team it seems work with standard lib
WOW that is great solution to use binary for calculate datetime! but there are 2 small bugs >>
- +2 years on
current_datetime.year + 2
, if current year is 2023 that will make loop range to 2024 and get wrong +1 leap day cuz year2024 is Leap Year ( suggest value iscurrent_datetime.year + 1
) - current date and hired date are not focus on february month , if start day counting after the end of february month that might not necessary to add leap day
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Yes it should be
current_datetime.year + 1
instead ofcurrent_datetime.year + 2
it was my mistake during the coding period. - You stated that it might not be necessary to add leap day which means you know that this can be solved by the policy.
temp_passport_list = [] | ||
temp_fullname_list = [] | ||
temp_time_current = datetime.datetime.now() | ||
temp_time_3yearsago = temp_time_current - relativedelta(years=3) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here
@thaiversion รบกวนขอ email หน่อยครับ |
@annibuliful ขออภัยที่ตอบช้าครับ |
mVATOR is coming to train 🚉💪
Repo
คุณซูลูทำไมเรายังไม่วาร์ป
The Dashboard
touch me plz
🕯 May the force be with YOU! 🕯