I'm not looking for anything complicated or enterprisey. I'm wondering if there exists something simple where I can "punch" in an out and say what I was working on. I'm interested in both how long I spend on different projects and how much I actually work per day. A command line tool would be preferable, but feel free to recommend anythi...
I want to write some functions for that, but before I do: Are there any to convert between time units?
...
I've got a timestamp as a string like:
Thu, 21 May 09 19:10:09 -0700
and I'd like to convert it to a relative time stamp like '20 minutes ago' or '3 days ago'.
What's the best way to do this using Objective-C for the iPhone?
...
I was able to find example code to get the current timestamp in Linux Epoch (Seconds since Midnight Jan 1st 1970), however I am having trouble finding an example as to how to calculate what the Epoch will be in the future, say for example 10 minutes from now, so how can I calculate a future time in Linux Epoch?
...
How do you get Hours and Minutes since Date.getHours and Date.getMinutes got deprecated?
Note: The examples that I found in google search used the deprecated methods.
Thank you.
...
I'm looking at the Paypal IPN docs, and it says the datetime stamps of their strings are formatted as:
HH:MM:SS DD Mmm YY, YYYY PST
So year is specified twice? Once in double digits, and another with 4 digits? This looks bizarre.
...
Hi,
I am trying to come up with an efficient method for truncating Ruby Time objects according to a given resolution.
class Time
def truncate resolution
t = to_a
case resolution
when :min
t[0] = 0
when :hour
t[0] = t[1] = 0
when :day
t[0] = t[1] = 0
t[2] = 1
when :month
t[0] ...
I have developed an algorithm using VB .net to cluster the given dataset.
I need output including time complexity of this code, space complexity
and total execution time of this code. How I will be able to achieve this?
Kindly let me know at your earliest, I will appreciate the same.
Warm regards.
Preeti Mulay
...
For ex:
If we have in table records like:
25/06/2009
28/12/2009
19/02/2010
16/04/2011
20/05/2012
I want to split/select this dates according to 6 month intervals starting from current date.
result should be like:
0-6 month from now: first record
7-12 month from now: second record
...
It will be much apreciated if you make this simp...
Relative dates are great to display the temporal incidence of recent activity, but at what distance is it an inconvenience for the user to see a relative date rather than an absolute one?
Let's assume the context is a forum.
...
Possible Duplicate:
Do you ever code just for fun?
I've been working as a 'professional' coder for about 11 years. (I've just turned 33.)
When I talk to my collegues, I find that most of them actually don't program any more in their spare time - 8 (or 10 :)) hours a day at their job is enough for them.
A difference between me a...
I am refactoring some code for a Ruby library. This code includes a Date parser.
One of the tests was to parse this string "2008-02-20T8:05:00-010:00" which is supposed to be ISO 8601.
The previous code would actually output: "Wed Feb 20 18:05:00 UTC 2008".
My new code outputs that: "Wed Feb 20 16:05:00 UTC 2008".
My question is: which...
In our client application we need to get the time of the server. For this getTime() operation added to an existing web service on server which basically returns DateTime.Now (.Net environment).
At the moment there seems no other time related need other than current time.
But what methods can be added beside this? If you had such an exp...
I'm looking at converting our Rails 2.3 application to correctly handle time zones (at the moment everything is in UTC which isn't right, but is convenient!).
I have these settings in environment.rb:
config.active_record.default_timezone = :utc
config.time_zone = "UTC"
Going forward, on each request in our app I plan on making the fo...
Hi,
I am trying to write a Python function which returns the same moon phase value as in the game NetHack. This is found in hacklib.c.
I have tried to simply copy the corresponding function from the NetHack code but I don't believe I am getting the correct results.
The function which I have written is phase_of_the_moon().
The functio...
There doesn't seem to be a clear answer to this in the documentation.
I'm interested in incrementing a variable time that counts the seconds since the program started. If the maximum value can count far into the future, like 100 years, then I don't care about letting the variable increment forever. Otherwise I'm going to have to think o...
Hi guys,
Im working on a simple calendar application and i want to have the above events display on the calendar [bank holidays and that].
The calendar is just a standard month view, with a link to view each day for each day in the month, and links to view next/ previous month and year etc...
i will probably have the mktime for each e...
How long is a .NET DateTime/TimeSpan tick?
...
I have a little Bash script which suspends the computer after a given number of minutes. However, I'd like to extend it to tell me what the time will be when it will be suspended, so I can get a rough idea of how long time I have left so to speak.
#!/bin/sh
let SECS=$1*60
echo "Sleeping for" $1 "minutes, which is" $SECS "seconds."
slee...
Lets say I have this amputated Person class:
class Person
{
public int Age { get; set; }
public string Country { get; set; }
public int SOReputation { get; set; }
public TimeSpan TimeSpentOnSO { get; set; }
...
}
I can then group on Age and Country like this:
var groups = aLis...