1. Why i have error in 98?
If it's line 98 above, you've used & instead of $ so I'm guessing that threw some weird error?
2. How to make different days on different months
3. How to make 366 days every 4 years
4. How to name days and months?
Ok, looks like you're actually doing a full on calendar - you may actually want to use python's datetime object for this. I can recreate a datetime object probably, but that doesn't really make sense if you're basically recreating a full on datetime system. Python's own datetime library should have everything you need and they'll be more efficient I'm sure
Have a look at this:
https://docs.python.org/2/library/datetime.html
It's a lot to take it (since there's so much more you can do with datetime), but that page should have everything you need to handle real date and time including calculations, leap years, days in months, date time formats etc.
Also I just re-read and saw that you didn't want real time - but the python datetime allows you to create your own date and time on creation, and you can just add time / days / months / years to the datetime object to move it forward.
5. For what is -2 in returns?
I will answer this just to explain what's happening. My clock object stores minutes and hours as integers so I can math with them
Unfortunately if I were to display them, they won't have leading zeros: 8:1 instead of 08:01 for example. So I first convert it to string and add a leading zero:
So now all the possible outputs are: 00,01,02,03,04,05,06,07,08,09,010,011,012,013,014,015,016,017,018,019,020,021,022,023. Well we only need the last two digits, so I looked up how to pull the 2 right most characters, and it's string_variable[n:] n is how many characters to bring back. If n is positive, it starts from the left; if n is negative, it starts from the right. so [-2:] brings back 2 characters from the right.
I don't know if there's a python shorthand to condense everything into a single statement so that I can return it without setting a temporary local variable to do it, that's why it requires two lines. I tried
return "0{self.hour}"[-2:] which returned "r}" so I guess that doesn't work
6. And the best. How to implement this to Event Handler of Remix
No idea what this is? Can you link?