[tw5] Re: Javascript Human Friendly Date Parser?

2020-09-15 Thread TW Tones
Amreus,

In tiddlywiki, which can be opened by users in any timezone, it makes use 
of local time zone settings. As a result you need to learn to take account 
of UTC, I live at UTC +10 and Summertime +11 so I feel it.

*I have not retested these following statements*

   - if you generate a date with the now macro and other methods using the 
   format "[UTC] rest of format" it will produce a date time stamp set at 
   UTC/Greenwich mean time not the local time.
   - When displaying dates using UTC makes says it is a UTC and display 
   with the local time zone added

In short tiddlywiki has support for international times zones, but you need 
to understand it to use it in some cases.

Regards
Tones

On Wednesday, 16 September 2020 07:05:56 UTC+10, amreus wrote:
>
> While trying to understand why dates are handled as they are in TIddyWiki, 
> I found out it is not TiddlyWiki but Javascript that is the problem.
>
> View this thread 
> 
>  
> for some craziness (https://stackoverflow.com/a/31732581)
>
> On Saturday, September 12, 2020 at 11:18:20 PM UTC-4 TW Tones wrote:
>
>> Re parsing an input;
>>
>> There is a facility in the current pre release keyboard-driven-input 
>> Macro 
>>
>> This allows actions to be executed from an input field, say with enter. 
>> This may provide the opportunity to do post entry processing. Effectively 
>> allowing you to make more sophisticated parsing take place on a per input 
>> basis.
>>
>> Thus you could pass the value to other functions, if available for the 
>> result.
>>
>> Regards
>> Tony
>>
>>
>>
>> On Sunday, 13 September 2020 01:45:25 UTC+10, amreus wrote:
>>>
>>>
>>> Ruby has this great library called Chronic that parses strings into Ruby 
>>> Date objects. It handles date strings that are human friendly as well as in 
>>> rigid formats.
>>>
>>> You can see some usage examples here: https://github.com/mojombo/chronic
>>>
>>> Has anyone already made such a parser for TiddyWiki5? Does anyone know 
>>> if a similar library exists for Javascript which could be used?
>>>
>>> Why?  I have a textbox for rapid list item entry.  Instead of picking a 
>>> due-date for example, I just want to include the due-date as part of the 
>>> text and have a macro parse it out from the title and add it as a date 
>>> field. An example entry in my textbox might look like this:
>>>
>>> Schedule a fire system test due:"oct 1 8am"
>>>
>>>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/b2f6f4a0-ca3e-4454-8236-f54affec6343o%40googlegroups.com.


[tw5] Re: Javascript Human Friendly Date Parser?

2020-09-15 Thread amreus
While trying to understand why dates are handled as they are in TIddyWiki, 
I found out it is not TiddlyWiki but Javascript that is the problem.

View this thread 

 
for some craziness (https://stackoverflow.com/a/31732581)

On Saturday, September 12, 2020 at 11:18:20 PM UTC-4 TW Tones wrote:

> Re parsing an input;
>
> There is a facility in the current pre release keyboard-driven-input Macro 
> 
>
> This allows actions to be executed from an input field, say with enter. 
> This may provide the opportunity to do post entry processing. Effectively 
> allowing you to make more sophisticated parsing take place on a per input 
> basis.
>
> Thus you could pass the value to other functions, if available for the 
> result.
>
> Regards
> Tony
>
>
>
> On Sunday, 13 September 2020 01:45:25 UTC+10, amreus wrote:
>>
>>
>> Ruby has this great library called Chronic that parses strings into Ruby 
>> Date objects. It handles date strings that are human friendly as well as in 
>> rigid formats.
>>
>> You can see some usage examples here: https://github.com/mojombo/chronic
>>
>> Has anyone already made such a parser for TiddyWiki5? Does anyone know if 
>> a similar library exists for Javascript which could be used?
>>
>> Why?  I have a textbox for rapid list item entry.  Instead of picking a 
>> due-date for example, I just want to include the due-date as part of the 
>> text and have a macro parse it out from the title and add it as a date 
>> field. An example entry in my textbox might look like this:
>>
>> Schedule a fire system test due:"oct 1 8am"
>>
>>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/51007ad5-b70c-44fc-80bf-35df960aacabn%40googlegroups.com.


[tw5] Re: Javascript Human Friendly Date Parser?

2020-09-12 Thread TW Tones
Re parsing an input;

There is a facility in the current pre release keyboard-driven-input Macro 


This allows actions to be executed from an input field, say with enter. 
This may provide the opportunity to do post entry processing. Effectively 
allowing you to make more sophisticated parsing take place on a per input 
basis.

Thus you could pass the value to other functions, if available for the 
result.

Regards
Tony



On Sunday, 13 September 2020 01:45:25 UTC+10, amreus wrote:
>
>
> Ruby has this great library called Chronic that parses strings into Ruby 
> Date objects. It handles date strings that are human friendly as well as in 
> rigid formats.
>
> You can see some usage examples here: https://github.com/mojombo/chronic
>
> Has anyone already made such a parser for TiddyWiki5? Does anyone know if 
> a similar library exists for Javascript which could be used?
>
> Why?  I have a textbox for rapid list item entry.  Instead of picking a 
> due-date for example, I just want to include the due-date as part of the 
> text and have a macro parse it out from the title and add it as a date 
> field. An example entry in my textbox might look like this:
>
> Schedule a fire system test due:"oct 1 8am"
>
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/72c66212-65fb-495f-a359-5b29231de2ddo%40googlegroups.com.


[tw5] Re: Javascript Human Friendly Date Parser?

2020-09-12 Thread amreus
Thanks I'll read it.

On Saturday, September 12, 2020 at 5:23:12 PM UTC-4, PMario wrote:
>
> Hi, 
>
> This thread may be of interest. 
> https://groups.google.com/forum/#!topic/tiddlywiki/Kyw0LMSRdj4
>
> -mario
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/300e5124-c2aa-4825-8b31-45ba8884d612o%40googlegroups.com.


[tw5] Re: Javascript Human Friendly Date Parser?

2020-09-12 Thread amreus
I'm using a phrase that is used by some of the authors of the libraries. 
You'll have to ask them the question.


On Saturday, September 12, 2020 at 5:26:58 PM UTC-4 PMario wrote:

> On Saturday, September 12, 2020 at 8:44:00 PM UTC+2, amreus wrote:
>
> Thanks for the list.  A better phrase would have been "natural language" 
>> date parser.
>>
>
> That's interesting. How many "natural languages" does it support?
>
> -m
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/9284d5cb-5b6e-4adb-a8e7-00258a52c653n%40googlegroups.com.


[tw5] Re: Javascript Human Friendly Date Parser?

2020-09-12 Thread PMario
On Saturday, September 12, 2020 at 8:44:00 PM UTC+2, amreus wrote:

Thanks for the list.  A better phrase would have been "natural language" 
> date parser.
>

That's interesting. How many "natural languages" does it support?

-m

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/eac74b90-787e-4859-9790-66329ddc7153o%40googlegroups.com.


[tw5] Re: Javascript Human Friendly Date Parser?

2020-09-12 Thread PMario
Hi, 

This thread may be of interest. 
https://groups.google.com/forum/#!topic/tiddlywiki/Kyw0LMSRdj4

-mario

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/84b78ac5-438b-48e7-9981-6dc853947ff9o%40googlegroups.com.


[tw5] Re: Javascript Human Friendly Date Parser?

2020-09-12 Thread amreus
I've tried that date picker - it jumps back a day due after selecting the 
date. But not always.  From what I  gather it has to do with the timezone 
and TiddlyWiki dates being UTC. 

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/db234774-7df1-495c-a6ef-4c506243d971n%40googlegroups.com.


[tw5] Re: Javascript Human Friendly Date Parser?

2020-09-12 Thread Saq Imtiaz
Here is a datepicker plugin that you can use:
https://kixam.github.io/TW5-datePicker/

I would say that while greater support for dates as perhaps an official 
plugin would be welcome, natural language parsing of dates isn't a common 
enough use case to justify consideration for the core. The core is always a 
balancing act between utility and size.

My work on natural language date parsing isn't published anywhere online, 
and it's honestly too raw and incomplete to share. I was aiming to emulate 
the way Todoist.com handles dates and there is still some way to go.

On Saturday, September 12, 2020 at 8:44:00 PM UTC+2, amreus wrote:
>
> Saq,
>
> Thanks for the list.  A better phrase would have been "natural language" 
> date parser.
>
> Dates in TiddlyWiki appear to be under-supported.  Would you agree, or am 
> I missing something?  I know about the 3 Date filter operators.  But there 
> seems to be a gap between the date storage format and the ability to enter 
> dates in a convenient way. I have not even found a proper working date/time 
> picker, which should come built-in imo.  
>
> I don't even know where to start.  Do you have a github or anything I 
> could browse for clues?
>
> Thank you.
>
> On Saturday, September 12, 2020 at 1:19:32 PM UTC-4 saq.i...@gmail.com 
> wrote:
>
>> Here is a list of JavaScript data parser libaries that I compiled a while 
>> back (so it may be out of date):
>>
>>- https://sugarjs.com/dates/
>>- https://github.com/holistics/js/tree/master/packages/date-parser
>>- https://github.com/wanasit/chrono
>>- https://github.com/datejs/Datejs
>>- https://github.com/juttle/moment-parser
>>
>> My use case was very similar to yours. Ultimately I wasn't happy with any 
>> of the existing options and rolled my own, which sadly isn't in a state to 
>> be shared any time soon.
>>
>> Hope this helps,
>> Saq
>>
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/21e6fb1a-0905-479a-80b1-9cf628314597o%40googlegroups.com.


[tw5] Re: Javascript Human Friendly Date Parser?

2020-09-12 Thread amreus
Saq,

Thanks for the list.  A better phrase would have been "natural language" 
date parser.

Dates in TiddlyWiki appear to be under-supported.  Would you agree, or am I 
missing something?  I know about the 3 Date filter operators.  But there 
seems to be a gap between the date storage format and the ability to enter 
dates in a convenient way. I have not even found a proper working date/time 
picker, which should come built-in imo.  

I don't even know where to start.  Do you have a github or anything I could 
browse for clues?

Thank you.

On Saturday, September 12, 2020 at 1:19:32 PM UTC-4 saq.i...@gmail.com 
wrote:

> Here is a list of JavaScript data parser libaries that I compiled a while 
> back (so it may be out of date):
>
>- https://sugarjs.com/dates/
>- https://github.com/holistics/js/tree/master/packages/date-parser
>- https://github.com/wanasit/chrono
>- https://github.com/datejs/Datejs
>- https://github.com/juttle/moment-parser
>
> My use case was very similar to yours. Ultimately I wasn't happy with any 
> of the existing options and rolled my own, which sadly isn't in a state to 
> be shared any time soon.
>
> Hope this helps,
> Saq
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/2433bebe-5491-4afe-9e21-7ea9a2a6a584n%40googlegroups.com.


[tw5] Re: Javascript Human Friendly Date Parser?

2020-09-12 Thread Saq Imtiaz
Here is a list of JavaScript data parser libaries that I compiled a while 
back (so it may be out of date):

   - https://sugarjs.com/dates/
   - https://github.com/holistics/js/tree/master/packages/date-parser
   - https://github.com/wanasit/chrono
   - https://github.com/datejs/Datejs
   - https://github.com/juttle/moment-parser
   
My use case was very similar to yours. Ultimately I wasn't happy with any 
of the existing options and rolled my own, which sadly isn't in a state to 
be shared any time soon.

Hope this helps,
Saq

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/48d4964e-49ba-4e0d-bae8-cb5bc2a0f213o%40googlegroups.com.