[tw5] Re: convert date in a text field to date format

2021-08-17 Thread
Mark,
yes, Eric's macro is there, tagged as ' $:/tags/Macro'.

I downloaded an emty Wiki - 'published-tw' field will also not be filled.

To use the "Update Publication Dates" button is a workaround but not the 
best solution.

I miss a system '*date*' field, like '*created*' or '*modified*'.
When this field is filled with format "DDth MMM " than it is a valid 
date of "[UTC]0MM0DD0hh0mm0ss0XXX" 

BTW: in $:/ControlPanel/Title of new journal tiddlers 
<#%24%3A%2Fconfig%2FNewJournal%2FTitle> is the same format (DDth MMM ) 
defined 

*One solution can be:*
1. Adding a text field (eg 'published')
2. Define, that this field is a date/time field 
3. The value of the 'published' field will be converted to 
"[UTC]0MM0DD0hh0mm0ss0XXX" 
and is available as system '*date*' field. 

Than it can also be used in TOC like
*> *

as it is possible for created: 
*>*

Regards
Stefan

Mark S. schrieb am Dienstag, 17. August 2021 um 01:00:46 UTC+2:

> [image: screenshot-converted-date.png]
>
> On Monday, August 16, 2021 at 3:57:54 PM UTC-7 Mark S. wrote:
>
>>
>> So, did you add Eric's macro to your TW and verify it works? That would 
>> be the first step in trouble-shooting. Remember, after loading the 
>> convertdate macro, you have to save and reload your TW file.
>>
>> It worked for me without problem:
>>
>>
>>
>>
>> On Monday, August 16, 2021 at 12:30:13 PM UTC-7 S² wrote:
>>
>>> Mark, thanks for feedback.
>>>
>>> The added 'published-tw' field is empty - no values:
>>> [image: published-tw.png]
>>>
>>> Mark S. schrieb am Montag, 16. August 2021 um 20:31:28 UTC+2:
>>>
 So what you really need is a filter operator that can do the conversion 
 and be used inside a sortsub operator. @Eric ?

 If you're willing to use an "update" button, one solution would be a 
 button that creates "published-tw" (date in TW format) fields for any 
 tiddler that has a "published" field. Then you could have the TOC sort on 
 the published-tw field. You would have to remember to periodically perform 
 the "update" whenever you had data changes. This two-step approach makes 
 certain activities in TW much easier to handle.

 So the code to update the field might look like:

 <$button>Update Publication Dates
 <$list filter="[has[published]]">
 <$wikify text="""<$macrocall $name=convertdate from={{!!published}} 
 to="[UTC]0MM0DD0hh0mm0ss0XXX" />""" name=result >
 <$action-setfield $field=published-tw $value=<> />
 
 
 

 Be sure to make a backup before trying this of course. Also, this 
 assumes that you have the latest version of Eric's converdate macro 
 installed.


 On Monday, August 16, 2021 at 3:37:26 AM UTC-7 S² wrote:

> Hello,
>
> thanks for all input and effort.
> It looks like it is not so easy...
>
> As I wrote, I use the text field ‘publish’ to add a date. (date 
> modified or created will not help me)
>
> This date can also be in the future.
> Format is *T.  * - (eg. *7. April 2021* or *13. August 2021*) 
> – this is the long date in German (like "DDth MMM ")
>
> 'published' is also shown in TOC:
>
>   [image: TOC.png]
>
> Now asked for a way to sort TOC on ‘published’ instead of Tiddler 
> title.
>
> The output should still be "DDth MMM "
>
> Thanks
> Stefan
> Eric Shulman schrieb am Montag, 16. August 2021 um 03:12:35 UTC+2:
>
>> On Sunday, August 15, 2021 at 4:47:47 PM UTC-7 Mark S. wrote:
>>
>>> Just tried 
>>> <>> to:"[UTC]0MM0DD0hh0mm0ss0XXX">>
>>> and got a hard RSOE ("from" not defined). I think the arguments need 
>>> to be tweaked in the macro.
>>>
>>
>> OOPS!  I had originally used "date" and "format" as the parameter 
>> names, but then I decided to change to using "from" and "to".  
>> Unfortunately, the arguments in the macro function declaration were 
>> still 
>> using "date" and "format", but internally, the macro code referenced 
>> "from" 
>> and "to" as intended.  I've corrected the arguments in the macro 
>> function 
>> declaration and posted an update here:
>>
>> https://tiddlytools.com/timer.html#TiddlyTools%2FTime%2FConvertDate
>>
>> Thanks,
>> -e
>>
>

-- 
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/38ea0c7a-e504-4ba9-a2e6-d9c908b85df0n%40googlegroups.com.


[tw5] Re: convert date in a text field to date format

2021-08-16 Thread 'Mark S.' via TiddlyWiki
[image: screenshot-converted-date.png]

On Monday, August 16, 2021 at 3:57:54 PM UTC-7 Mark S. wrote:

>
> So, did you add Eric's macro to your TW and verify it works? That would be 
> the first step in trouble-shooting. Remember, after loading the convertdate 
> macro, you have to save and reload your TW file.
>
> It worked for me without problem:
>
>
>
>
> On Monday, August 16, 2021 at 12:30:13 PM UTC-7 S² wrote:
>
>> Mark, thanks for feedback.
>>
>> The added 'published-tw' field is empty - no values:
>> [image: published-tw.png]
>>
>> Mark S. schrieb am Montag, 16. August 2021 um 20:31:28 UTC+2:
>>
>>> So what you really need is a filter operator that can do the conversion 
>>> and be used inside a sortsub operator. @Eric ?
>>>
>>> If you're willing to use an "update" button, one solution would be a 
>>> button that creates "published-tw" (date in TW format) fields for any 
>>> tiddler that has a "published" field. Then you could have the TOC sort on 
>>> the published-tw field. You would have to remember to periodically perform 
>>> the "update" whenever you had data changes. This two-step approach makes 
>>> certain activities in TW much easier to handle.
>>>
>>> So the code to update the field might look like:
>>>
>>> <$button>Update Publication Dates
>>> <$list filter="[has[published]]">
>>> <$wikify text="""<$macrocall $name=convertdate from={{!!published}} 
>>> to="[UTC]0MM0DD0hh0mm0ss0XXX" />""" name=result >
>>> <$action-setfield $field=published-tw $value=<> />
>>> 
>>> 
>>> 
>>>
>>> Be sure to make a backup before trying this of course. Also, this 
>>> assumes that you have the latest version of Eric's converdate macro 
>>> installed.
>>>
>>>
>>> On Monday, August 16, 2021 at 3:37:26 AM UTC-7 S² wrote:
>>>
 Hello,

 thanks for all input and effort.
 It looks like it is not so easy...

 As I wrote, I use the text field ‘publish’ to add a date. (date 
 modified or created will not help me)

 This date can also be in the future.
 Format is *T.  * - (eg. *7. April 2021* or *13. August 2021*) 
 – this is the long date in German (like "DDth MMM ")

 'published' is also shown in TOC:

   [image: TOC.png]

 Now asked for a way to sort TOC on ‘published’ instead of Tiddler title.

 The output should still be "DDth MMM "

 Thanks
 Stefan
 Eric Shulman schrieb am Montag, 16. August 2021 um 03:12:35 UTC+2:

> On Sunday, August 15, 2021 at 4:47:47 PM UTC-7 Mark S. wrote:
>
>> Just tried 
>> <>
>> and got a hard RSOE ("from" not defined). I think the arguments need 
>> to be tweaked in the macro.
>>
>
> OOPS!  I had originally used "date" and "format" as the parameter 
> names, but then I decided to change to using "from" and "to".  
> Unfortunately, the arguments in the macro function declaration were still 
> using "date" and "format", but internally, the macro code referenced 
> "from" 
> and "to" as intended.  I've corrected the arguments in the macro function 
> declaration and posted an update here:
>
> https://tiddlytools.com/timer.html#TiddlyTools%2FTime%2FConvertDate
>
> Thanks,
> -e
>


-- 
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/79344627-e3b3-4b8a-a9d7-8d6bf84f3843n%40googlegroups.com.


[tw5] Re: convert date in a text field to date format

2021-08-16 Thread 'Mark S.' via TiddlyWiki

So, did you add Eric's macro to your TW and verify it works? That would be 
the first step in trouble-shooting. Remember, after loading the convertdate 
macro, you have to save and reload your TW file.

It worked for me without problem:




On Monday, August 16, 2021 at 12:30:13 PM UTC-7 S² wrote:

> Mark, thanks for feedback.
>
> The added 'published-tw' field is empty - no values:
> [image: published-tw.png]
>
> Mark S. schrieb am Montag, 16. August 2021 um 20:31:28 UTC+2:
>
>> So what you really need is a filter operator that can do the conversion 
>> and be used inside a sortsub operator. @Eric ?
>>
>> If you're willing to use an "update" button, one solution would be a 
>> button that creates "published-tw" (date in TW format) fields for any 
>> tiddler that has a "published" field. Then you could have the TOC sort on 
>> the published-tw field. You would have to remember to periodically perform 
>> the "update" whenever you had data changes. This two-step approach makes 
>> certain activities in TW much easier to handle.
>>
>> So the code to update the field might look like:
>>
>> <$button>Update Publication Dates
>> <$list filter="[has[published]]">
>> <$wikify text="""<$macrocall $name=convertdate from={{!!published}} 
>> to="[UTC]0MM0DD0hh0mm0ss0XXX" />""" name=result >
>> <$action-setfield $field=published-tw $value=<> />
>> 
>> 
>> 
>>
>> Be sure to make a backup before trying this of course. Also, this assumes 
>> that you have the latest version of Eric's converdate macro installed.
>>
>>
>> On Monday, August 16, 2021 at 3:37:26 AM UTC-7 S² wrote:
>>
>>> Hello,
>>>
>>> thanks for all input and effort.
>>> It looks like it is not so easy...
>>>
>>> As I wrote, I use the text field ‘publish’ to add a date. (date modified 
>>> or created will not help me)
>>>
>>> This date can also be in the future.
>>> Format is *T.  * - (eg. *7. April 2021* or *13. August 2021*) – 
>>> this is the long date in German (like "DDth MMM ")
>>>
>>> 'published' is also shown in TOC:
>>>
>>>   [image: TOC.png]
>>>
>>> Now asked for a way to sort TOC on ‘published’ instead of Tiddler title.
>>>
>>> The output should still be "DDth MMM "
>>>
>>> Thanks
>>> Stefan
>>> Eric Shulman schrieb am Montag, 16. August 2021 um 03:12:35 UTC+2:
>>>
 On Sunday, August 15, 2021 at 4:47:47 PM UTC-7 Mark S. wrote:

> Just tried 
> <>
> and got a hard RSOE ("from" not defined). I think the arguments need 
> to be tweaked in the macro.
>

 OOPS!  I had originally used "date" and "format" as the parameter 
 names, but then I decided to change to using "from" and "to".  
 Unfortunately, the arguments in the macro function declaration were still 
 using "date" and "format", but internally, the macro code referenced 
 "from" 
 and "to" as intended.  I've corrected the arguments in the macro function 
 declaration and posted an update here:

 https://tiddlytools.com/timer.html#TiddlyTools%2FTime%2FConvertDate

 Thanks,
 -e

>>>

-- 
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/e782d244-31e7-4c23-ba00-94b2d16031dan%40googlegroups.com.


[tw5] Re: convert date in a text field to date format

2021-08-16 Thread
Mark, thanks for feedback.

The added 'published-tw' field is empty - no values:
[image: published-tw.png]

Mark S. schrieb am Montag, 16. August 2021 um 20:31:28 UTC+2:

> So what you really need is a filter operator that can do the conversion 
> and be used inside a sortsub operator. @Eric ?
>
> If you're willing to use an "update" button, one solution would be a 
> button that creates "published-tw" (date in TW format) fields for any 
> tiddler that has a "published" field. Then you could have the TOC sort on 
> the published-tw field. You would have to remember to periodically perform 
> the "update" whenever you had data changes. This two-step approach makes 
> certain activities in TW much easier to handle.
>
> So the code to update the field might look like:
>
> <$button>Update Publication Dates
> <$list filter="[has[published]]">
> <$wikify text="""<$macrocall $name=convertdate from={{!!published}} 
> to="[UTC]0MM0DD0hh0mm0ss0XXX" />""" name=result >
> <$action-setfield $field=published-tw $value=<> />
> 
> 
> 
>
> Be sure to make a backup before trying this of course. Also, this assumes 
> that you have the latest version of Eric's converdate macro installed.
>
>
> On Monday, August 16, 2021 at 3:37:26 AM UTC-7 S² wrote:
>
>> Hello,
>>
>> thanks for all input and effort.
>> It looks like it is not so easy...
>>
>> As I wrote, I use the text field ‘publish’ to add a date. (date modified 
>> or created will not help me)
>>
>> This date can also be in the future.
>> Format is *T.  * - (eg. *7. April 2021* or *13. August 2021*) – 
>> this is the long date in German (like "DDth MMM ")
>>
>> 'published' is also shown in TOC:
>>
>>   [image: TOC.png]
>>
>> Now asked for a way to sort TOC on ‘published’ instead of Tiddler title.
>>
>> The output should still be "DDth MMM "
>>
>> Thanks
>> Stefan
>> Eric Shulman schrieb am Montag, 16. August 2021 um 03:12:35 UTC+2:
>>
>>> On Sunday, August 15, 2021 at 4:47:47 PM UTC-7 Mark S. wrote:
>>>
 Just tried 
 <>
 and got a hard RSOE ("from" not defined). I think the arguments need to 
 be tweaked in the macro.

>>>
>>> OOPS!  I had originally used "date" and "format" as the parameter names, 
>>> but then I decided to change to using "from" and "to".  Unfortunately, the 
>>> arguments in the macro function declaration were still using "date" and 
>>> "format", but internally, the macro code referenced "from" and "to" as 
>>> intended.  I've corrected the arguments in the macro function declaration 
>>> and posted an update here:
>>>
>>> https://tiddlytools.com/timer.html#TiddlyTools%2FTime%2FConvertDate
>>>
>>> Thanks,
>>> -e
>>>
>>

-- 
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/d90afcff-2aad-4979-9fb3-73e39660e4e3n%40googlegroups.com.


[tw5] Re: convert date in a text field to date format

2021-08-16 Thread 'Mark S.' via TiddlyWiki
So what you really need is a filter operator that can do the conversion and 
be used inside a sortsub operator. @Eric ?

If you're willing to use an "update" button, one solution would be a button 
that creates "published-tw" (date in TW format) fields for any tiddler that 
has a "published" field. Then you could have the TOC sort on the 
published-tw field. You would have to remember to periodically perform the 
"update" whenever you had data changes. This two-step approach makes 
certain activities in TW much easier to handle.

So the code to update the field might look like:

<$button>Update Publication Dates
<$list filter="[has[published]]">
<$wikify text="""<$macrocall $name=convertdate from={{!!published}} 
to="[UTC]0MM0DD0hh0mm0ss0XXX" />""" name=result >
<$action-setfield $field=published-tw $value=<> />




Be sure to make a backup before trying this of course. Also, this assumes 
that you have the latest version of Eric's converdate macro installed.


On Monday, August 16, 2021 at 3:37:26 AM UTC-7 S² wrote:

> Hello,
>
> thanks for all input and effort.
> It looks like it is not so easy...
>
> As I wrote, I use the text field ‘publish’ to add a date. (date modified 
> or created will not help me)
>
> This date can also be in the future.
> Format is *T.  * - (eg. *7. April 2021* or *13. August 2021*) – 
> this is the long date in German (like "DDth MMM ")
>
> 'published' is also shown in TOC:
>
>   [image: TOC.png]
>
> Now asked for a way to sort TOC on ‘published’ instead of Tiddler title.
>
> The output should still be "DDth MMM "
>
> Thanks
> Stefan
> Eric Shulman schrieb am Montag, 16. August 2021 um 03:12:35 UTC+2:
>
>> On Sunday, August 15, 2021 at 4:47:47 PM UTC-7 Mark S. wrote:
>>
>>> Just tried 
>>> <>
>>> and got a hard RSOE ("from" not defined). I think the arguments need to 
>>> be tweaked in the macro.
>>>
>>
>> OOPS!  I had originally used "date" and "format" as the parameter names, 
>> but then I decided to change to using "from" and "to".  Unfortunately, the 
>> arguments in the macro function declaration were still using "date" and 
>> "format", but internally, the macro code referenced "from" and "to" as 
>> intended.  I've corrected the arguments in the macro function declaration 
>> and posted an update here:
>>
>> https://tiddlytools.com/timer.html#TiddlyTools%2FTime%2FConvertDate
>>
>> Thanks,
>> -e
>>
>

-- 
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/17785b0a-29bd-4997-a703-0f0e7cab09f4n%40googlegroups.com.


[tw5] Re: convert date in a text field to date format

2021-08-16 Thread
 

Hello,

thanks for all input and effort.
It looks like it is not so easy...

As I wrote, I use the text field ‘publish’ to add a date. (date modified or 
created will not help me)

This date can also be in the future.
Format is *T.  * - (eg. *7. April 2021* or *13. August 2021*) – 
this is the long date in German (like "DDth MMM ")

'published' is also shown in TOC:

  [image: TOC.png]

Now asked for a way to sort TOC on ‘published’ instead of Tiddler title.

The output should still be "DDth MMM "

Thanks
Stefan
Eric Shulman schrieb am Montag, 16. August 2021 um 03:12:35 UTC+2:

> On Sunday, August 15, 2021 at 4:47:47 PM UTC-7 Mark S. wrote:
>
>> Just tried 
>> <>
>> and got a hard RSOE ("from" not defined). I think the arguments need to 
>> be tweaked in the macro.
>>
>
> OOPS!  I had originally used "date" and "format" as the parameter names, 
> but then I decided to change to using "from" and "to".  Unfortunately, the 
> arguments in the macro function declaration were still using "date" and 
> "format", but internally, the macro code referenced "from" and "to" as 
> intended.  I've corrected the arguments in the macro function declaration 
> and posted an update here:
>
> https://tiddlytools.com/timer.html#TiddlyTools%2FTime%2FConvertDate
>
> Thanks,
> -e
>

-- 
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/89e72ff1-72ac-4a90-b40c-dbd7bce9df84n%40googlegroups.com.


[tw5] Re: convert date in a text field to date format

2021-08-15 Thread Eric Shulman
On Sunday, August 15, 2021 at 4:47:47 PM UTC-7 Mark S. wrote:

> Just tried 
> <>
> and got a hard RSOE ("from" not defined). I think the arguments need to be 
> tweaked in the macro.
>

OOPS!  I had originally used "date" and "format" as the parameter names, 
but then I decided to change to using "from" and "to".  Unfortunately, the 
arguments in the macro function declaration were still using "date" and 
"format", but internally, the macro code referenced "from" and "to" as 
intended.  I've corrected the arguments in the macro function declaration 
and posted an update here:

https://tiddlytools.com/timer.html#TiddlyTools%2FTime%2FConvertDate

Thanks,
-e

-- 
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/56b0ae37-8392-445a-b679-092e172dccc8n%40googlegroups.com.


[tw5] Re: convert date in a text field to date format

2021-08-15 Thread 'Mark S.' via TiddlyWiki


On Sunday, August 15, 2021 at 5:08:35 PM UTC-7 TW Tones wrote:

> Format  T.  ?
>
> Surely you mean "0DD. MMM "
>
>
That's a good point. I imagine S2's source application is using some local 
formatting code (e.g. German, Dutch). So the format would have to be 
altered to the ISO 8601 standard for use in javascript (and probably all of 
TW) when specifying input. But, presumably the output would automatically 
conform to the browser's locale string ??



 

-- 
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/7e298246-990b-4bc9-a9e2-4c891fb71431n%40googlegroups.com.


[tw5] Re: convert date in a text field to date format

2021-08-15 Thread TW Tones
Format  T.  ?

Surely you mean "0DD. MMM "

In this case you would parse this date to extract the DD, MMM and  as 
separate values, convert from MMM to a month number with a 12 month table, 
then re-assemble them into a tiddlywiki date/time string. I suggest 1200 or 
12 noon as the time, otherwise zero fill seconds and milliseconds.

eg D all before ".", 
Month split[ ]nth[2]
Year split[ ]nth[3] or last[]

Regrds
Tones
On Monday, 16 August 2021 at 09:47:47 UTC+10 Mark S. wrote:

> @ Eric
>
> Just tried 
>
> <>
>
> and got a hard RSOE ("from" not defined). I think the arguments need to be 
> tweaked in the macro.
>
> HTH
> On Friday, August 13, 2021 at 2:53:09 PM UTC-7 Eric Shulman wrote:
>
>> On Friday, August 13, 2021 at 12:36:11 AM UTC-7 S² wrote:
>>
>>> I use a created text field 'published', which will be filled with a date.
>>> (This date can also be in the future)
>>> format is *T.  * - (eg. *7. April 2021* or *13. August 2021*).
>>>
>>> 1. How can this be converted into a date format?
>>>
>>
>> I have just added a new javascript macro to the TiddlyTools timer package.
>>
>> https://tiddlytools.com/timer.html#TiddlyTools%2FTime%2FConvertDate
>>
>>- To convert a date to a different format, use <>from:inputdate to:outputformat>>.
>>- The input date can use any date format recognized by the Javascript 
>>Date.parse() function. Generally this conforms to *ISO 8601 standard 
>>date format*. 
>>- The output format uses TiddlyWiki Date Format codes 
>>, and defaults to 
>>*[UTC]0MM0DD0hh0mm0ss0XXX*.
>>
>> enjoy,
>> -e
>>
>

-- 
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/cc381b92-116b-4665-bd16-9ebe4decf23cn%40googlegroups.com.


[tw5] Re: convert date in a text field to date format

2021-08-15 Thread 'Mark S.' via TiddlyWiki
@ Eric

Just tried 

<>

and got a hard RSOE ("from" not defined). I think the arguments need to be 
tweaked in the macro.

HTH
On Friday, August 13, 2021 at 2:53:09 PM UTC-7 Eric Shulman wrote:

> On Friday, August 13, 2021 at 12:36:11 AM UTC-7 S² wrote:
>
>> I use a created text field 'published', which will be filled with a date.
>> (This date can also be in the future)
>> format is *T.  * - (eg. *7. April 2021* or *13. August 2021*).
>>
>> 1. How can this be converted into a date format?
>>
>
> I have just added a new javascript macro to the TiddlyTools timer package.
>
> https://tiddlytools.com/timer.html#TiddlyTools%2FTime%2FConvertDate
>
>- To convert a date to a different format, use >.
>- The input date can use any date format recognized by the Javascript 
>Date.parse() function. Generally this conforms to *ISO 8601 standard 
>date format*. 
>- The output format uses TiddlyWiki Date Format codes 
>, and defaults to 
>*[UTC]0MM0DD0hh0mm0ss0XXX*.
>
> enjoy,
> -e
>

-- 
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/37a7b1cb-bb21-4878-90e2-392a2f34521bn%40googlegroups.com.


[tw5] Re: convert date in a text field to date format

2021-08-15 Thread 'Mark S.' via TiddlyWiki
Is your source text field in T.  format?

Are you converting it back to TW format?

Where are you storing the converted value?



On Friday, August 13, 2021 at 12:36:11 AM UTC-7 S² wrote:

> Hello forum,
>
> I use a created text field 'published', which will be filled with a date.
> (This date can also be in the future)
> format is *T.  * - (eg. *7. April 2021* or *13. August 2021*).
>
> 1. How can this be converted into a date format?
>
> 2. The 'published' field is also shown in TOC - $:/_macros/alternative/toc 
> -  (see 
> https://groups.google.com/g/tiddlywiki/c/AAPGy6pFpnc/m/hlKHyhzsAwAJ).
> I would like to have TOC sorted on this field (recent on top) 
>
> Thanks for feedback
> Stefan
>

-- 
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/734b3a58-8a29-4a9f-8182-3e96dba95d03n%40googlegroups.com.


[tw5] Re: convert date in a text field to date format

2021-08-14 Thread
Hello Eric,

thanks for the new macro, but I have no idea, how to assign it  :-(
Regards
Stefan
Eric Shulman schrieb am Freitag, 13. August 2021 um 23:53:09 UTC+2:

> On Friday, August 13, 2021 at 12:36:11 AM UTC-7 S² wrote:
>
>> I use a created text field 'published', which will be filled with a date.
>> (This date can also be in the future)
>> format is *T.  * - (eg. *7. April 2021* or *13. August 2021*).
>>
>> 1. How can this be converted into a date format?
>>
>
> I have just added a new javascript macro to the TiddlyTools timer package.
>
> https://tiddlytools.com/timer.html#TiddlyTools%2FTime%2FConvertDate
>
>- To convert a date to a different format, use >.
>- The input date can use any date format recognized by the Javascript 
>Date.parse() function. Generally this conforms to *ISO 8601 standard 
>date format*. 
>- The output format uses TiddlyWiki Date Format codes 
>, and defaults to 
>*[UTC]0MM0DD0hh0mm0ss0XXX*.
>
> enjoy,
> -e
>

-- 
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/ef8c8168-53d5-41ef-b017-1a5c37f22292n%40googlegroups.com.


[tw5] Re: convert date in a text field to date format

2021-08-13 Thread Eric Shulman
On Friday, August 13, 2021 at 12:36:11 AM UTC-7 S² wrote:

> I use a created text field 'published', which will be filled with a date.
> (This date can also be in the future)
> format is *T.  * - (eg. *7. April 2021* or *13. August 2021*).
>
> 1. How can this be converted into a date format?
>

I have just added a new javascript macro to the TiddlyTools timer package.

https://tiddlytools.com/timer.html#TiddlyTools%2FTime%2FConvertDate

   - To convert a date to a different format, use <>.
   - The input date can use any date format recognized by the Javascript 
   Date.parse() function. Generally this conforms to *ISO 8601 standard 
   date format*. 
   - The output format uses TiddlyWiki Date Format codes 
   , and defaults to 
   *[UTC]0MM0DD0hh0mm0ss0XXX*.

enjoy,
-e

-- 
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/d477ccc7-c0ca-4c7f-963e-fe819c9b7ec2n%40googlegroups.com.


[tw5] Re: convert date in a text field to date format

2021-08-13 Thread
Hello Mark,

the displayed field in TOC should be unchanged, as I filled it: *T.  
* - (eg. *7. April 2021* or *13. August 2021*).
Stefan
Mark S. schrieb am Freitag, 13. August 2021 um 20:35:40 UTC+2:

> I would use a whole bunch of the new search-replace filters. What is your 
> target date format?
>
> On Friday, August 13, 2021 at 12:36:11 AM UTC-7 S² wrote:
>
>> Hello forum,
>>
>> I use a created text field 'published', which will be filled with a date.
>> (This date can also be in the future)
>> format is *T.  * - (eg. *7. April 2021* or *13. August 2021*).
>>
>> 1. How can this be converted into a date format?
>>
>> 2. The 'published' field is also shown in TOC - $:/
>> _macros/alternative/toc -  (see 
>> https://groups.google.com/g/tiddlywiki/c/AAPGy6pFpnc/m/hlKHyhzsAwAJ).
>> I would like to have TOC sorted on this field (recent on top) 
>>
>> Thanks for feedback
>> Stefan
>>
>

-- 
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/6742e8c3-c99c-4d02-90ce-796065960a4en%40googlegroups.com.


[tw5] Re: convert date in a text field to date format

2021-08-13 Thread 'Mark S.' via TiddlyWiki
I would use a whole bunch of the new search-replace filters. What is your 
target date format?

On Friday, August 13, 2021 at 12:36:11 AM UTC-7 S² wrote:

> Hello forum,
>
> I use a created text field 'published', which will be filled with a date.
> (This date can also be in the future)
> format is *T.  * - (eg. *7. April 2021* or *13. August 2021*).
>
> 1. How can this be converted into a date format?
>
> 2. The 'published' field is also shown in TOC - $:/_macros/alternative/toc 
> -  (see 
> https://groups.google.com/g/tiddlywiki/c/AAPGy6pFpnc/m/hlKHyhzsAwAJ).
> I would like to have TOC sorted on this field (recent on top) 
>
> Thanks for feedback
> Stefan
>

-- 
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/f1af8e2c-2f5d-4c97-8493-2b3ce6bffec9n%40googlegroups.com.