AnyDateTime library

View: New views
8 Messages — Rating Filter:   Alert me  

AnyDateTime library

by Daniel Friesen :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I'm working on a DateTime library, AnyDateTime. The plan is to have a library that can cover nearly any possible time or date in history. The AnyDateTime library has a storage format which uses 22 characters, and sorts correctly in the database.
The range of possible dates this library can cover is from 99,999,999,999 00:00:00 B.C.E. to 999,999,999,999 23:59:59 C.E.
^_^ So quite simply... it can cover dates all the way from before the Big Bang, to beyond the time when our sun dies and our planet dies as well, past the time the Milky Way and Andromeda galaxies are speculated to collide, even past the time of the theorized Big Rip. Though I admit, it can't cover the Degenerate, Black Hole, or Dark eras (those are well into the trillions).

Quite simply, the idea is to be able to make use of it in Semantic MediaWiki as an alternative date format. That way it's available for anyone covering historical dates and such.
-- 
~Daniel Friesen (Dantman, Nadir-Seen-Fire)
~Profile/Portfolio: http://nadir-seen-fire.com
-The Nadir-Point Group (http://nadir-point.com)
--It's Wiki-Tools subgroup (http://wiki-tools.com)
--The ElectronicMe project (http://electronic-me.org)
-Wikia ACG on Wikia.com (http://wikia.com/wiki/Wikia_ACG)
--Animepedia (http://anime.wikia.com)
--Narutopedia (http://naruto.wikia.com)

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Semediawiki-devel mailing list
Semediawiki-devel@...
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel

Re: AnyDateTime library

by Yaron Koren :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

You should be aware of the "Historical Date" class, which Temlakos
created sometime last year and which is in use, in truncated form, in
the Semantic Calendar extension; it was also discussed for use on SMW,
though I don't know what happened with that.. I also don't know if
that class handles times.

-Yaron


On Wed, Sep 3, 2008 at 12:55 PM, Daniel Friesen <dan_the_man@...> wrote:

> I'm working on a DateTime library, AnyDateTime. The plan is to have a
> library that can cover nearly any possible time or date in history. The
> AnyDateTime library has a storage format which uses 22 characters, and sorts
> correctly in the database.
> The range of possible dates this library can cover is from 99,999,999,999
> 00:00:00 B.C.E. to 999,999,999,999 23:59:59 C.E.
> ^_^ So quite simply... it can cover dates all the way from before the Big
> Bang, to beyond the time when our sun dies and our planet dies as well, past
> the time the Milky Way and Andromeda galaxies are speculated to collide,
> even past the time of the theorized Big Rip. Though I admit, it can't cover
> the Degenerate, Black Hole, or Dark eras (those are well into the
> trillions).
>
> Quite simply, the idea is to be able to make use of it in Semantic MediaWiki
> as an alternative date format. That way it's available for anyone covering
> historical dates and such.
>
> --
> ~Daniel Friesen (Dantman, Nadir-Seen-Fire)
> ~Profile/Portfolio: http://nadir-seen-fire.com
> -The Nadir-Point Group (http://nadir-point.com)
> --It's Wiki-Tools subgroup (http://wiki-tools.com)
> --The ElectronicMe project (http://electronic-me.org)
> -Wikia ACG on Wikia.com (http://wikia.com/wiki/Wikia_ACG)
> --Animepedia (http://anime.wikia.com)
> --Narutopedia (http://naruto.wikia.com)
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great
> prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Semediawiki-devel mailing list
> Semediawiki-devel@...
> https://lists.sourceforge.net/lists/listinfo/semediawiki-devel
>
>

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Semediawiki-devel mailing list
Semediawiki-devel@...
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel

Re: AnyDateTime library

by Denny Vrandečić-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

There's also a student of ours working on something close to it,
although I am not totally informed about the status. Since I don't know
if Fabian is on this list, I'll CC him.

denny

Daniel Friesen wrote:

> I'm working on a DateTime library, AnyDateTime
> <http://svn.nadir-point.com/viewvc/php-projects/trunk/AnyDateTime/>. The
> plan is to have a library that can cover nearly any possible time or
> date in history. The AnyDateTime library has a storage format which uses
> 22 characters, and sorts correctly in the database.
> The range of possible dates this library can cover is from
> 99,999,999,999 00:00:00 B.C.E. to 999,999,999,999 23:59:59 C.E.
> ^_^ So quite simply... it can cover dates all the way from before the
> Big Bang, to beyond the time when our sun dies and our planet dies as
> well, past the time the Milky Way and Andromeda galaxies are speculated
> to collide, even past the time of the theorized Big Rip
> <http://en.wikipedia.org/wiki/Big_Rip>. Though I admit, it can't cover
> the Degenerate, Black Hole, or Dark eras (those are well into the
> trillions).
>
> Quite simply, the idea is to be able to make use of it in Semantic
> MediaWiki as an alternative date format. That way it's available for
> anyone covering historical dates and such.
>
> --
> ~Daniel Friesen (Dantman, Nadir-Seen-Fire)
> ~Profile/Portfolio: http://nadir-seen-fire.com
> -The Nadir-Point Group (http://nadir-point.com)
> --It's Wiki-Tools subgroup (http://wiki-tools.com)
> --The ElectronicMe project (http://electronic-me.org)
> -Wikia ACG on Wikia.com (http://wikia.com/wiki/Wikia_ACG)
> --Animepedia (http://anime.wikia.com)
> --Narutopedia (http://naruto.wikia.com)
>
>
> ------------------------------------------------------------------------
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Semediawiki-devel mailing list
> Semediawiki-devel@...
> https://lists.sourceforge.net/lists/listinfo/semediawiki-devel

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Semediawiki-devel mailing list
Semediawiki-devel@...
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel

Re: AnyDateTime library

by Daniel Friesen :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

^_^ heh... this project gets more fun by the hour... Julian dates... right, two calenders to deal with... Going to have to work on conversions.

I looked over the Historical Date in Semantic Calender. No, it doesn't handle time. Also, it to is limited with the float that it uses.

Hmm, rather than an overcomplicated output setup, I'm probably going to create a small format for outputting. One that works with Gregorian and Julian bases. Otherwise I'll overload with possible formats of outputs.

Btw... AnyDateTime stores in a ?? notation for things it does not know...
????????????0501?????? would be understood as May 1st. So it can store just years, a date of the year, just a time, or whatever... Sorting of course gets strange if you're using weird combinations of data. But there is no real way to sort those anyways. However this does mean that May 1st will be sorted before Dec 25th and after April 1st when you are dealing with dates in the year.
~Daniel Friesen (Dantman, Nadir-Seen-Fire)
~Profile/Portfolio: http://nadir-seen-fire.com
-The Nadir-Point Group (http://nadir-point.com)
--It's Wiki-Tools subgroup (http://wiki-tools.com)
--The ElectronicMe project (http://electronic-me.org)
-Wikia ACG on Wikia.com (http://wikia.com/wiki/Wikia_ACG)
--Animepedia (http://anime.wikia.com)
--Narutopedia (http://naruto.wikia.com)
Yaron Koren wrote:
Hi,

You should be aware of the "Historical Date" class, which Temlakos
created sometime last year and which is in use, in truncated form, in
the Semantic Calendar extension; it was also discussed for use on SMW,
though I don't know what happened with that.. I also don't know if
that class handles times.

-Yaron


On Wed, Sep 3, 2008 at 12:55 PM, Daniel Friesen dan_the_man@... wrote:
  
I'm working on a DateTime library, AnyDateTime. The plan is to have a
library that can cover nearly any possible time or date in history. The
AnyDateTime library has a storage format which uses 22 characters, and sorts
correctly in the database.
The range of possible dates this library can cover is from 99,999,999,999
00:00:00 B.C.E. to 999,999,999,999 23:59:59 C.E.
^_^ So quite simply... it can cover dates all the way from before the Big
Bang, to beyond the time when our sun dies and our planet dies as well, past
the time the Milky Way and Andromeda galaxies are speculated to collide,
even past the time of the theorized Big Rip. Though I admit, it can't cover
the Degenerate, Black Hole, or Dark eras (those are well into the
trillions).

Quite simply, the idea is to be able to make use of it in Semantic MediaWiki
as an alternative date format. That way it's available for anyone covering
historical dates and such.

--
~Daniel Friesen (Dantman, Nadir-Seen-Fire)
~Profile/Portfolio: http://nadir-seen-fire.com
-The Nadir-Point Group (http://nadir-point.com)
--It's Wiki-Tools subgroup (http://wiki-tools.com)
--The ElectronicMe project (http://electronic-me.org)
-Wikia ACG on Wikia.com (http://wikia.com/wiki/Wikia_ACG)
--Animepedia (http://anime.wikia.com)
--Narutopedia (http://naruto.wikia.com)

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great
prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Semediawiki-devel mailing list
Semediawiki-devel@...
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel


    

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
  

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Semediawiki-devel mailing list
Semediawiki-devel@...
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel

Re: AnyDateTime library

by S Page-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Daniel Friesen wrote:
> I'm working on a DateTime library, AnyDateTime
> <http://svn.nadir-point.com/viewvc/php-projects/trunk/AnyDateTime/>. The
> plan is to have a library that can cover nearly any possible time or
> date in history. The AnyDateTime library has a storage format which uses
> 22 characters, and sorts correctly in the database.

Interesting!  Are you going to convert between different calendars?  IMO
it's a complete waste, ISO8601 is the one true format.  But everyone
implements the edge cases like years > 9999 and year "0" differently,
see notes at http://www.w3.org/TR/xmlschema-2/#dateTime

> ????????????0501?????? would be understood as May 1st.
Or are you going to make people enter dates in your nifty format? You
could make it somewhat user-friendly just by putting the same dividers
that ISO8601 uses, thus
   ????????????-05-01T??:??:??
It only adds 5 characters...

> The range of possible dates this library can cover is from
> 99,999,999,999 00:00:00 B.C.E. to 999,999,999,999 23:59:59 C.E.

Another way to handle dates far back in the past is to use Mya (million
years ago, which is just a conversion for the custom unit Type:Time.
See e.g. http://sandbox.semantic-mediawiki.org/wiki/Property:Geologic_time

I assume you're not bothering with timezone support and I wonder if it
can work with Simile:Timeline.

You could still claim your datatype isNumeric, converting to a slightly
inaccurate float just for SMW's collation.  On the other hand, if you
stick with string, SMW's "LIKE" comparator for strings would let you
query for
   [[event::~????????????0501*]]
to find "everything happening on May 1st" whether it's got a year and
time or not.

> Hmm, rather than an overcomplicated output setup, I'm probably going
> to create a small format for outputting. One that works with Gregorian
> and Julian bases. Otherwise I'll overload with possible formats of outputs.

A while back you could control Type:Date in query results and with
[[Property:display_units]] to specify a "custom unit" that was really a
strftime() formatting string, thus
   |?Date of birth#%b %d=Birthday
in a query would display "Sep 3".  It was cool, it's broken now, but I
incoherently think an explicit Property:Has_display_format that each
datatype interprets is the way to go.

How will you export as RDF?  A while back a datatype could not export as
xsd:dateTime in some situations and then as xsd:string in others.

> Quite simply, the idea is to be able to make use of it in Semantic
> MediaWiki as an alternative date format. That way it's available for
> anyone covering historical dates and such.

Denny wrote:
> There's also a student of ours working on something close to it,
> although I am not totally informed about the status. Since I don't know
> if Fabian is on this list, I'll CC him.

I think it would still be useful for someone to extend Type:Date to
support dates beyond the range of the PHP timestamp (and support
timezone, and use the user's Date & time format preference, ...).  I
think the thing to do in Date:Time is detect when you're at the edge of
the range and then do some simple timestamp= (YYYY + (12 * (MM + 31 *
(DD + 24 * (HH + 60 * (MM + 60 * SS) to turn it into a large number.
Again, only bother doing this for ISO8601 dates.

Good luck y'all, and despise me because I know more details than I can
code.  Damn armchair commenters :-)

"Tonight I'm going to party like it's 1999-12-31T23:59:59 !" -- The
Artist Formerly Known as Prince.
--
=S Page

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Semediawiki-devel mailing list
Semediawiki-devel@...
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel

Re: AnyDateTime library

by cnit :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Daniel Friesen пишет:

> ^_^ heh... this project gets more /fun/ by the hour... Julian dates...
> right, two calenders to deal with... Going to have to work on conversions.
>
> I looked over the Historical Date in Semantic Calender. No, it doesn't
> handle time. Also, it to is limited with the float that it uses.
>
> Hmm, rather than an overcomplicated output setup, I'm probably going
> to create a small format for outputting. One that works with Gregorian
> and Julian bases. Otherwise I'll overload with possible formats of
> outputs.

Output probably must not be too simple, because localized dates may be
presented differently. Localization should not be forgotten
when comes to the dates and the time.
Dmitriy

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Semediawiki-devel mailing list
Semediawiki-devel@...
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel

Re: AnyDateTime library

by Markus Krötzsch-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

indeed, we are having a project for improving Type:Date based on Temlakos'
input for historic dates and various extensions of our own. The goal is to
have a single unified Date type that can handle historic dates, timezones,
international input and output formats, calendar conversion, and possibly
incompleteness (distinguishing "2001" from "2001-01-01T00:00" in *some*
contexts). This will be approached step-by-step, starting with an
internationalised input parser that goes beyond the UNIX era.

We may use something like AnyDateTime as a storage format, but probably not
for sorting (so Dates will stay "numeric"). For most purposes, we would like
to implement an idea of a totally ordered, "physical" time, i.e. every two
input times should be comparable and correspond to real time points of the
world. This excludes inputs like "May 1" which would describe an infinite
number of recurring intervals that we are not prepared to handle. We will
probably assume timezones to be given (explicit or implicit), not like in XML
Schema where there are two incomparable types of time points: those with
timezone information and those without. Implementing timezones requires some
amount of calendar support to get collation right, e.g. to order "Mar 1 YYYY
00:00 -12" as compared to "Feb 28 YYYY 23:59 +12" for any given year.

But Fabian will look at one thing at a time. Maybe he can comment on the
current state of the input parser.

Supporting output formats for queries would be possible, though probably using
some simpler, more internationalisable format than "%b %d". I could imagine
that the user just specifies an "example date" that is used as a template for
formatting dates. But this is yet another sub-task.

Regards,

Markus



On Mittwoch, 3. September 2008, Denny Vrandečić wrote:

> There's also a student of ours working on something close to it,
> although I am not totally informed about the status. Since I don't know
> if Fabian is on this list, I'll CC him.
>
> denny
>
> Daniel Friesen wrote:
> > I'm working on a DateTime library, AnyDateTime
> > <http://svn.nadir-point.com/viewvc/php-projects/trunk/AnyDateTime/>. The
> > plan is to have a library that can cover nearly any possible time or
> > date in history. The AnyDateTime library has a storage format which uses
> > 22 characters, and sorts correctly in the database.
> > The range of possible dates this library can cover is from
> > 99,999,999,999 00:00:00 B.C.E. to 999,999,999,999 23:59:59 C.E.
> > ^_^ So quite simply... it can cover dates all the way from before the
> > Big Bang, to beyond the time when our sun dies and our planet dies as
> > well, past the time the Milky Way and Andromeda galaxies are speculated
> > to collide, even past the time of the theorized Big Rip
> > <http://en.wikipedia.org/wiki/Big_Rip>. Though I admit, it can't cover
> > the Degenerate, Black Hole, or Dark eras (those are well into the
> > trillions).
> >
> > Quite simply, the idea is to be able to make use of it in Semantic
> > MediaWiki as an alternative date format. That way it's available for
> > anyone covering historical dates and such.
> >
> > --
> > ~Daniel Friesen (Dantman, Nadir-Seen-Fire)
> > ~Profile/Portfolio: http://nadir-seen-fire.com
> > -The Nadir-Point Group (http://nadir-point.com)
> > --It's Wiki-Tools subgroup (http://wiki-tools.com)
> > --The ElectronicMe project (http://electronic-me.org)
> > -Wikia ACG on Wikia.com (http://wikia.com/wiki/Wikia_ACG)
> > --Animepedia (http://anime.wikia.com)
> > --Narutopedia (http://naruto.wikia.com)
> >
> >
> > ------------------------------------------------------------------------
> >
> > -------------------------------------------------------------------------
> > This SF.Net email is sponsored by the Moblin Your Move Developer's
> > challenge Build the coolest Linux based applications with Moblin SDK &
> > win great prizes Grand prize is a trip for two to an Open Source event
> > anywhere in the world
> > http://moblin-contest.org/redirect.php?banner_id=100&url=/
> >
> >
> > ------------------------------------------------------------------------
> >
> > _______________________________________________
> > Semediawiki-devel mailing list
> > Semediawiki-devel@...
> > https://lists.sourceforge.net/lists/listinfo/semediawiki-devel
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's
> challenge Build the coolest Linux based applications with Moblin SDK & win
> great prizes Grand prize is a trip for two to an Open Source event anywhere
> in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Semediawiki-devel mailing list
> Semediawiki-devel@...
> https://lists.sourceforge.net/lists/listinfo/semediawiki-devel


--
Markus Krötzsch
Semantic MediaWiki    http://semantic-mediawiki.org
http://korrekt.org    markus@...


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Semediawiki-devel mailing list
Semediawiki-devel@...
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel

signature.asc (196 bytes) Download Attachment

Re: AnyDateTime library

by Daniel Friesen :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Mhmm, I already thought of that. The library isn't going to handle the names on it's own. It'll have an array that maps the numbers to the different forms that are valid for that date. Short version, long, and any other aliases. ie: Sep Sept and September.

For actual output, for the Georgian vs. Julian output, since I don't want to make it to confusing with dozens of different possible letters being used. Instead a wrapping:
G{ ... } and J{ ... } encloses the format specifying areas that are Georgian or Julian.
I'll probably do something similar as well that'll allow for a timezone to be specified.
~Daniel Friesen (Dantman, Nadir-Seen-Fire)
~Profile/Portfolio: http://nadir-seen-fire.com
-The Nadir-Point Group (http://nadir-point.com)
--It's Wiki-Tools subgroup (http://wiki-tools.com)
--The ElectronicMe project (http://electronic-me.org)
-Wikia ACG on Wikia.com (http://wikia.com/wiki/Wikia_ACG)
--Animepedia (http://anime.wikia.com)
--Narutopedia (http://naruto.wikia.com)
CNIT wrote:
Daniel Friesen пишет:
  
^_^ heh... this project gets more /fun/ by the hour... Julian dates... 
right, two calenders to deal with... Going to have to work on conversions.

I looked over the Historical Date in Semantic Calender. No, it doesn't 
handle time. Also, it to is limited with the float that it uses.

Hmm, rather than an overcomplicated output setup, I'm probably going 
to create a small format for outputting. One that works with Gregorian 
and Julian bases. Otherwise I'll overload with possible formats of 
outputs.
    

Output probably must not be too simple, because localized dates may be 
presented differently. Localization should not be forgotten
when comes to the dates and the time.
Dmitriy

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Semediawiki-devel mailing list
Semediawiki-devel@...
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel
  

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Semediawiki-devel mailing list
Semediawiki-devel@...
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel
LightInTheBox - Buy quality products at wholesale price!