Adding 24 to both endtime and current time when the endtime is less than starttime seems to work.On Thu, May 2, 2013 at 10:51 AM, Francis Njenga <korefn@gmail.com> wrote:
@Adam not knowing the offending language, a concrete solution is as a pain somaking sure he knows that specific fact('In the abstract') would have sufficed IMHO.
On Thu, May 2, 2013 at 10:46 AM, Adam Nelson <adam@varud.com> wrote:
@francis I think he's using the word 'timestamp' loosely as the time of day. But yes, as everyone agrees so far, just use the timestamp which has all the date information and then comparison is trivial.Since we all seem to be having fun wasting time on a Thursday, I did it in Python for demonstration purposes. I set 'a' to now and then 'b' to now a few seconds later and then arbitrarily set 'c' to a time within the period. This is date-sensitive.----------------➜ ~ pythonPython 2.7.3 (default, Dec 5 2012, 11:30:37)[GCC 4.2.1 Compatible Apple Clang 4.1 ((tags/Apple/clang-421.11.66))] on darwinType "help", "copyright", "credits" or "license" for more information.>>> import datetime>>> a = datetime.datetime.now()>>> adatetime.datetime(2013, 5, 2, 10, 42, 36, 877059)>>> b = datetime.datetime.now()>>> bdatetime.datetime(2013, 5, 2, 10, 42, 50, 684714)>>> c = datetime.datetime(2013, 5, 2, 10, 42, 49, 000000)>>> cdatetime.datetime(2013, 5, 2, 10, 42, 49)>>> bool(a <= b < c)False>>> bool(a <= c < b)True>>>-------------------On Thu, May 2, 2013 at 9:37 AM, Francis Njenga <korefn@gmail.com> wrote:This is the essence of a timestamp.A timestamp will have all these details and you can extract the relevant details from it.I.e. datetime has both date and time. You can use the time or date where relevant.
On Thu, May 2, 2013 at 10:31 AM, Peter Karunyu <pkarunyu@gmail.com> wrote:
@Lawi, does the start times change per day or are they sorta fixed at a preset time?Say, every day at 0600Hrs is the start, and every day at 1800Hrs is the end
_______________________________________________
skunkworks mailing list
skunkworks@lists.my.co.ke
------------
List info, subscribe/unsubscribe
http://lists.my.co.ke/cgi-bin/mailman/listinfo/skunkworks
------------
Skunkworks Rules
http://my.co.ke/phpbb/viewtopic.php?f=24&t=94
------------
Other services @ http://my.co.ke
--
Kore Francis NjengaRunning and Walking are only breaths apart.
_______________________________________________
skunkworks mailing list
skunkworks@lists.my.co.ke
------------
List info, subscribe/unsubscribe
http://lists.my.co.ke/cgi-bin/mailman/listinfo/skunkworks
------------
Skunkworks Rules
http://my.co.ke/phpbb/viewtopic.php?f=24&t=94
------------
Other services @ http://my.co.ke
_______________________________________________
skunkworks mailing list
skunkworks@lists.my.co.ke
------------
List info, subscribe/unsubscribe
http://lists.my.co.ke/cgi-bin/mailman/listinfo/skunkworks
------------
Skunkworks Rules
http://my.co.ke/phpbb/viewtopic.php?f=24&t=94
------------
Other services @ http://my.co.ke
--
Kore Francis NjengaRunning and Walking are only breaths apart.
_______________________________________________
skunkworks mailing list
skunkworks@lists.my.co.ke
------------
List info, subscribe/unsubscribe
http://lists.my.co.ke/cgi-bin/mailman/listinfo/skunkworks
------------
Skunkworks Rules
http://my.co.ke/phpbb/viewtopic.php?f=24&t=94
------------
Other services @ http://my.co.ke
_______________________________________________
skunkworks mailing list
skunkworks@lists.my.co.ke
------------
List info, subscribe/unsubscribe
http://lists.my.co.ke/cgi-bin/mailman/listinfo/skunkworks
------------
Skunkworks Rules
http://my.co.ke/phpbb/viewtopic.php?f=24&t=94
------------
Other services @ http://my.co.ke