I wasn't sure exactly how to explain it in the thread title, so sorry if it's a little underscriptive.
Right.
I have a text file that contains the timetable for the bus I need to take every morning.
Code: Select all
0800
0815
0825
0830
...
1820
1850
1920
1950
2050
2150
2300
In other words, how can I compare the current system time to the list and determine what is the nearest time in it. Finding the current time in the same format wouldn't be too hard, I think. Something like
Code: Select all
time = "{getDate(),dateformat,kk:mm}";
It would have to display the time of the next bus. So, if it's 18:28 on my clock, I'd want it to display the 18:50 bus. (The text can be shown on a widget perhaps)
I'm absolutely stuck. Any ideas on how to approach this?