Timeline for Does currentTime fall between 18:00 and 2:00
Current License: CC BY-SA 3.0
7 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jul 20, 2012 at 12:19 | comment | added | ATaylor | @JonTaylor Thank you :) Thanks to that upvote, I finally can vote your answer up myself. Because, as a matter of fact, it is the most applicable code of conduct :) | |
Jul 20, 2012 at 11:57 | history | edited | ATaylor | CC BY-SA 3.0 |
Fixed a logical error.
|
Jul 20, 2012 at 11:52 | comment | added | ATaylor | @JonTaylor Yeah, I know what you mean, though I'm guessing he could also...instead of using a real date/time combination, use a 'week calendar'. In that case, he would know the weekday, but not the actual unix timestamp. And of course, I missed making a critical point. Hang on, let me edit. | |
Jul 20, 2012 at 11:41 | comment | added | Jon Taylor | Well I would presume he is using some kind of date/time combination otherwise he would be unaware as to whether the closing time of 2am is indeed tomorrow or the day after or today etc. Unfortuately this means that your code would close him at anything before 2am today when in fact he may have been open till 3am this morning and only 2am tomorrow. Hope that makes sense? Im tired lol. | |
Jul 20, 2012 at 11:33 | comment | added | ATaylor | @JonTaylor Yes, I am aware that actual unix timestamps are continuous and you are of course correct. But the way I understood it, he doesn't use Unix-Timestamps to determine whether it's open of closed, but rather relative timestamps reaching from 0 to 86400. | |
Jul 20, 2012 at 11:31 | comment | added | Jon Taylor | why use the or case with timestamps? Do you actually mean timestamps? If so then a more appropriate way would just be to check if the tiestamp falls between the openTimeTimestamp and closeTimeTimestamp. | |
Jul 20, 2012 at 11:29 | history | answered | ATaylor | CC BY-SA 3.0 |