Case closed?


Calculating the "exact duration" of 2 months is very hard to impossible, as months do not have the same amount of seconds. For example: 31 dec + 2 months... is 31 feb. Also here and there extra seconds are added, thus you get times like: 23:59:62 (62 seconds, when 3 additional seconds are added). You can do compromises, like using days in the range 1-28 and only change the month.

Some more languages:

# JAVA
Code:
org.joda.time.Seconds.secondBetween(now, intwo)

# PHP
PHP:
use Carbon\Carbon;

$now = Carbon::now();
$intwo = $now->copy()->addMonths(2);
$seconds = $now->diffInSeconds($intwo);

# PERL
Code:
use Time::Piece;
use Time::Seconds;

my $now = localtime;
my $intwo = $now + 2 * ONE_MONTH;
my $seconds = ($intwo - $now)->seconds;
And you are even forgetting about the messing with time when switching from 'wintertime' to 'summertime' and back.
 
If you want exact calculation, express month in x amount of seconds - a twelfth of a year. Anything else is up to you to define and with it the difficulty in doing calculations with that stuff.
 
If you want exact calculation, express month in x amount of seconds - a twelfth of a year. Anything else is up to you to define and with it the difficulty in doing calculations with that stuff.
# Dude, even: date --date='2012-01-31 09:00 next Month'
# prints: Fri Mar 2 09:00:00 CET 2012
# So it also sums 31 days.


M' => 60*60*24*31, # HERE BE BUGS for month that do not have 31 days.
'O' => 2629743, # 30.44 days (real month, but hours shift) @Your suggestion
 
I actually lol'ed! (Does anybody ever do that when they write "lol")

I love how we are set on calculating the 'release date' of the Pyra to the nearest picosecond :)

Fwiw, we probably need a less relativist means of measurement. Or an announcement from The Dragon.
 
i love the ambiguity of "2 Months" trade mark.....
however has it ever been established the the aforesaid mentioned 2 months are indeed actually consecutive? which then opens another can of worms in such that are they indeed from the same Annual period?
 
Very nice to see the unboxing video. Always nice to see the care ED takes even when making a youtube Wideo.

Very happy to see how well thought-out the case is, without difficult assembly/disassembly. Just great.
 
'O' => 2629743, # 30.44 days (real month, but hours shift) @Your suggestion
So? It's precise and consistent. You could then go and say: Two months from now is the same time of day as it is now on the day that contains the point in time, that is two precise months from now.
 
i love the ambiguity of "2 Months" trade mark.....
however has it ever been established the the aforesaid mentioned 2 months are indeed actually consecutive?
They are - first and last come in consecutive order.
 
i love the ambiguity of "2 Months" trade mark.....
however has it ever been established the the aforesaid mentioned 2 months are indeed actually consecutive? which then opens another can of worms in such that are they indeed from the same Annual period?

IIRC the offical rendering of the 2 month (tm) trademark indicated a period that can be any length of time, but most likely at least two months. So in that sense, all of the code snippets in this thread have been equally valid ;)
 
My position is that you can not measure a MOON measurement (month) with a SOLAR measurement (year).
Sure you can, they just don't like up perfectly. Kinda like other measurement systems we use. I usually measure things in cubits and finger widths because it is easy.
 
Back
Top