2
votes
2answers
3k views

Formatting a datetime string in the YYYYMMDD format

I'm working with some strange APIs that requires the dates to be sent in the YYYYMMDD format. I was thinking of doing something like this: ...
2
votes
0answers
11 views

Parsing time ranges with PyParsing

The following code is intended to parse a string of the following format and return whether the current time falls in that window: ...
3
votes
1answer
61 views

Displaying TimeSpan as largest interval (with units) - Part II

[This is a follow-up question to: Displaying TimeSpan as largest interval (with units). The code listed here has been refactored since the original question was posed. Please note that the scope of ...
3
votes
3answers
426 views

Beautifying Dates

There has got to be a better way to do this. I have a method which returns either your standard "01/01/2014" Date or "January 1st, 2014" Date of the assembly file write time. Any suggestions on ...
5
votes
3answers
288 views

Displaying TimeSpan as largest interval (with units)

The following method is used in a call center application to display an approximation of remaining time. The call center telephone operator would inform the caller that they could perform their ...
3
votes
1answer
1k views

Outputting a countdown in a div

I got this code working with the jQuery Countdown Plugin to take a string input and output a countdown in a div. Is there a better way of implementing this? JSFiddler HTML ...
2
votes
1answer
96 views

WMSAuth implementation

I have to implement WMSAuth in C#: http://wmsauth.org/examples ...
6
votes
4answers
203 views

Better way to repeatedly use istringstream in “counting minutes” challenge

I was doing this easy challenge "Counting Minutes I" from Coderbyte.com where you just calculate the number of minutes between two given times. The second time is always after the first, although it ...
1
vote
1answer
210 views

Milliseconds to Time string & Time string to Milliseconds

Fast Time conversion I'm trying to write a very fast time-to-string and string-to-time function. I noticed that on low CPU mobile devices this function has, even if minimal, impact on the ...
8
votes
3answers
145 views

Printing a week range string in Python

For some reporting, I need to print a human readable date string for the week covered by the report, using just the standard python module library. So the strings should look like: Dec 29, 2013 - ...
3
votes
3answers
290 views

Calculating user birth information

Can you please check if I've written the code correctly? The task was: Calculate the user's month of birth as a a number, where January = 0 through to December = 11. Take the string entered Get ...
7
votes
2answers
5k views

Java Date formatter

The (real life) problem Following my question on SO, I found out that printing a Java Date() in a custom format is quite tedious: ...