Date handling is quite a mess, since "what ever you do, it will be wrong". 
Let me explain. 

You want to have an input like: DD mmm YYYY 
I want to insert a date like this: YYYY 0MM 0DD eg: 2013 08 28

So how ever you store your date. If I would have to use it I'd want to have 
a possibility to adjust the display format.
If the plugin does it my way, it may hurt your eyes :)

In javascript you have a lot of functions and possibilities [1]:

eg: 

>>> new Date()
results in 

Sat Dec 14 2013 17:48:22 GMT+0100 (CET)


>>> new Date().getTime()
gives you the miliseconds from 1.1.1970 till now

1387039710156

--------------------

While the first string contains all the info to see the whole information 
when I did create it, it is quite hard to calculate eg: a time difference 
with it. I'll need to convert it, to use it with a program. 

With the second one time difference is easy. But nobody can read it :)

So it depends on you, how to store your dates. You'll need to convert them 
anyway. With TW5 you can have any format. Just your plugins will need to 
know, how to work with them.

There are allways pros and cons. 

The TW format for eg: "modified" is YYYYMMDDhhmmssmil

YYYY ... year ... 2013
MM ... month ... 12
DD ... day ... 14
hh ... hour ... 18
mm ... minute ... 03
ss ... second ... 10
mil ... milisecond ... 023

Pro:
- a very simple human readable format
- a widget to display this info is relatively simple. 

Con: 
- no time zone is encoded, so it is lost
- every user will want to apply his own display format

that's why there are several (currently undocumented) functions to convert 
date formats. I think they are similar to TWc [2]. 
@Jeremy ??

hope that helps
-mario

[1] 
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/getTime
[2] http://tiddlywiki.org/#DateFormats

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to