python - Adding and subtracting dates without Standard Library -


I am working in a limited environment for developing a dragon script

My problem is That I should be able to complete addition and subtraction throughout the day.

For example, I get the following string:

  "09/10 / 20,0 9: 59: 47-16"  

formatted as year / month / day, hours: minutes: second-ms

How do I add 30 seconds to this number in Python? I can not do more than basic addition and subtraction and string parsing functions

You are doing math in different bases, you will be able to parse the string and come up with a list of values Need, for example (year, month, day, hour, minute, second), and then add and subtract second-base math. For example, hour base is -24, so you have to use the modulus to calculate. It seems like a homework suspicious, so I will not go into any other detail :)


Comments

Popular posts from this blog

MySql variables and php -

url rewriting - How to implement the returnurl like SO in PHP? -

Which Python client library should I use for CouchdB? -