Re: Convert date

2023-07-15 Thread Mark Smith via use-livecode
Thanks Bob. These examples are all very handy to have. Added to the wiki!! Just 
kidding, I do think we need a wiki somewhere for these kinds of code snippets 
but I’m not offering to build it (this year). We’ll have to see how bored I am 
next year, or, hopefully, someone else will beat me to it. 

> On 14 Jul 2023, at 4:34 pm, Bob Sneidar via use-livecode 
>  wrote:
> 
> Hmmm… I read the enhancement request. I’m still in the dark though on how to 
> get to "2023-07-14 08:30:00" from “7/14/23” using format strings. Here’s my 
> solution for those who do not want to download the masterLibrary. Given 
> these, what else do you need? 
> 
> FUNCTION formatDate theDate, theFormat
>   /*
>   Accepts any valid date for the first parameter. If not a valid date, it 
> simply returns
>   what was passed. Second parameter can be any of the following:
>   sql date: date in the -mm-dd format
>   short date, abbreviated date, internet date, long date: LC versions of the 
> same
>   julian date: Julian number based on (I believe) Jacques formula
>   */
> 
>   put theDate into tSavedDate
>   put the itemdelimiter into theOldDelim
>   set the itemdelimiter to "-"
> 
>   IF the length of item 1 of theDate = 4 AND \
>  the number of items of theDate = 3 AND \
>  item 1 of theDate is a number AND \
>  item 2 of theDate is a number AND \
>  item 3 of theDate is a number THEN
>  put item 2 of theDate & "/" & \
> item 3 of theDate & "/" & \
> item 1 of theDate into theDate
>   END IF
> 
>   -- replace "." with "/" in theDate
>   convert theDate to dateitems
>   set the itemdelimiter to theOldDelim
> 
>   if the number of items of theDate <> 7 then
>  answer "'" & theDate & "' is not a valid date format!"
>  return tSavedDate
>   end if
> 
>   SWITCH theFormat
>  CASE "sql date"
> put item 1 of theDate & "-" & \
>format("%02d",item 2 of theDate) & "-" & \
>format("%02d",item 3 of theDate) into theDate
> break
>      CASE "short date"
> convert theDate from dateitems to short date
> break
>  CASE "abbreviated date"
> convert theDate from dateitems to abbreviated date
>     break
>  CASE "abbr date"
> convert theDate from dateitems to abbreviated date
> break
>  CASE "internet date"
> convert theDate from dateitems to internet date
> break
>  CASE "long date"
> convert theDate from dateitems to long date
> break
>  CASE "julian date"
> put the date into theDate
> convert theDate to dateItems
> IF  ((item 2 of theDate = 1) OR (item 2 of theDate = 2)) THEN
>put 1 into theDay
> ELSE
>put 0 into theDay
> END IF
> put item 1 of theDate + 4800 - theDay into theYear
> put item 2 of theDate + (12 * theDay) - 3 into theMonth
> put item 3 of theDate + \
>((153 * theMonth + 2) div 5) + \
>(365 * theYear) + \
>(theYear div 4) - \
>    (theYear div 100) + \
>(theYear div 400) - \
>32045 into theDate
> break
>   END SWITCH
> 
>   return theDate
> END formatDate
> 
> FUNCTION formatTime theTime, theFormat
>   /*
>   accepts any valid time and returns the form of the time specified in the 
> second parameter.
>   The valid formats are:
>   sql time: hh:mm:ss (Note: combining sql date from the formatDate() function 
> with the
>   sql time will produce a valid SQL date time type).
>   short time: LC short time format
>   abbreviated time: LC abbr time format (same as short time)
>   long time: LC long time format
>   seconds: the number of seconds since the prior midnight
>   military: the military time 00:00 - 23:59
>   */
> 
>   IF theTime is empty THEN return empty
> 
>   set the numberformat to "00"
>   SWITCH theFormat
>  CASE "sql time"
> convert theTime to dateitems
> put (item 4 of theTime +0) & ":" & \
>(item 5 of theTime +0) & ":" & \
>(item 6 of theTime +0) into theTime
> break
>  CASE "short time"
> convert theTime to short time
> break
>  CASE "abbreviated time"
> convert theTime to abbreviated time
> break
>  CASE "long ti

Re: Convert date

2023-07-15 Thread Alex Tweedly via use-livecode


On 14/07/2023 19:45, Bob Sneidar via use-livecode wrote:

Because I’m not that good with regular expressions and the format function. :-) 
But you example has one too many close parens.


Oops - I got caught out copying / pasting again :-(

Yes, of course it should have been


put format("%s-%02d-%02d", item 1 of theDate, item 2 of theDate, \
 item 3 of theDate) into theDate



Also, for SQL Date I do not thing UK or US matters. It’s -MM-DD everywhere, 
isn’t it?

Yes, sql (or ISO) is same everywhere.


Also, I assumed that the localization of the LC engine would take into account 
the local date format for the built in date functions. Is that incorrect?


That is correct, but there is kind of a problem (or at least limitation) 
with the function.


If I have a user here (UK) type a date into a field, and then I try to 
format it to SQLdate (or anything else) using this function, it will 
fail. My user will type something  (15/07/2023), and that gets an 
"invalid date" error.


I'm not sure there is anything you can do that is completely safe - you 
can't tell whether a /-separated date string is US or UK. But I'd argue 
that dates ready to pass in to the function are either 
internally-generated (so they'll be sql, or dateitems, or otherwise 
unambiguous), or they are user-generated (and hence local format).  And 
therefore I would suggest changing the code to



   put item 2 of theDate & "/" & \
  item 3 of theDate & "/" & \
  item 1 of theDate into theDate
   convert theDate to dateitems
ELSE
   convert theDate from system date to dateitems
END IF

-- replace "." with "/" in theDate

-- convert theDate to dateitems


Alex.


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Convert date

2023-07-15 Thread Alex Tweedly via use-livecode



On 14/07/2023 16:13, Bob Sneidar via use-livecode wrote:

I beg to differ. Again, Livecode is a way to build both the tools and the 
product made by those tools. Livecode is NOT a collection of every conceivable 
tool for everything everyone wants to do. No language is.

I think the LC dev team is far more useful to everyone if they focus on 
completing the projects they already have, and squashing the long standing and 
pervasive bugs that exist.

I think if there is a fairly easy way to create the tool you need with the 
codeset you now have, then you would need a compelling reason, like dramatic 
performance increases to justify building it into the engine.


I guess the primary argument is having it available "out of the box" for 
new users, or for those who are still unfamiliar / uncertain about LC 
scripting.



What I'd *really* like to see the LC dev team work on is bringing LCS 
libraries up to the same level of support as LCB libraries. It's taken a 
few years to finally get LCS widgets - and that was clearly HARD work. I 
would have thought t would be much easier - and just about as useful - 
to get CS libraries.


(and even to add some better support, such as "require library" that 
will properly deal with missing / duplicate attempts to load a library).


Alex.


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Convert date

2023-07-14 Thread Bob Sneidar via use-livecode
Because I’m not that good with regular expressions and the format function. :-) 
But you example has one too many close parens. 

Also, for SQL Date I do not thing UK or US matters. It’s -MM-DD everywhere, 
isn’t it? 

Also, I assumed that the localization of the LC engine would take into account 
the local date format for the built in date functions. Is that incorrect? 

Bob S


> On Jul 14, 2023, at 11:39 AM, Alex Tweedly via use-livecode 
>  wrote:
> 
> 
> On 14/07/2023 16:34, Bob Sneidar via use-livecode wrote:
>>   CASE "sql date"
>>  put item 1 of theDate & "-" & \
>> format("%02d",item 2 of theDate) & "-" & \
>> format("%02d",item 3 of theDate) into theDate
>>  break
> 
> Why not just
> 
> put format("%s-%02d-%02d", item 1 of theDate, item 2 of theDate), \
>   item 3 of theDate) into theDate
> 
> Alex.
> 
> btw - you forgot the if/switch check for
>"if in the USA" vs "if in the UK" :-) :-)
> 
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Convert date

2023-07-14 Thread Alex Tweedly via use-livecode



On 14/07/2023 16:34, Bob Sneidar via use-livecode wrote:

   CASE "sql date"
  put item 1 of theDate & "-" & \
 format("%02d",item 2 of theDate) & "-" & \
 format("%02d",item 3 of theDate) into theDate
  break


Why not just

put format("%s-%02d-%02d", item 1 of theDate, item 2 of theDate), \
   item 3 of theDate) into theDate

Alex.

btw - you forgot the if/switch check for
"if in the USA" vs "if in the UK" :-) :-)


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Convert date

2023-07-14 Thread Bob Sneidar via use-livecode
Hmmm… I read the enhancement request. I’m still in the dark though on how to 
get to "2023-07-14 08:30:00" from “7/14/23” using format strings. Here’s my 
solution for those who do not want to download the masterLibrary. Given these, 
what else do you need? 

FUNCTION formatDate theDate, theFormat
   /*
   Accepts any valid date for the first parameter. If not a valid date, it 
simply returns
   what was passed. Second parameter can be any of the following:
   sql date: date in the -mm-dd format
   short date, abbreviated date, internet date, long date: LC versions of the 
same
   julian date: Julian number based on (I believe) Jacques formula
   */

   put theDate into tSavedDate
   put the itemdelimiter into theOldDelim
   set the itemdelimiter to "-"
   
   IF the length of item 1 of theDate = 4 AND \
  the number of items of theDate = 3 AND \
  item 1 of theDate is a number AND \
  item 2 of theDate is a number AND \
  item 3 of theDate is a number THEN
  put item 2 of theDate & "/" & \
 item 3 of theDate & "/" & \
 item 1 of theDate into theDate
   END IF
   
   -- replace "." with "/" in theDate
   convert theDate to dateitems
   set the itemdelimiter to theOldDelim
   
   if the number of items of theDate <> 7 then
  answer "'" & theDate & "' is not a valid date format!"
  return tSavedDate
   end if
   
   SWITCH theFormat
  CASE "sql date"
 put item 1 of theDate & "-" & \
format("%02d",item 2 of theDate) & "-" & \
format("%02d",item 3 of theDate) into theDate
 break
  CASE "short date"
 convert theDate from dateitems to short date
 break
  CASE "abbreviated date"
     convert theDate from dateitems to abbreviated date
 break
  CASE "abbr date"
 convert theDate from dateitems to abbreviated date
 break
      CASE "internet date"
 convert theDate from dateitems to internet date
 break
  CASE "long date"
 convert theDate from dateitems to long date
 break
  CASE "julian date"
 put the date into theDate
 convert theDate to dateItems
 IF  ((item 2 of theDate = 1) OR (item 2 of theDate = 2)) THEN
put 1 into theDay
 ELSE
put 0 into theDay
 END IF
 put item 1 of theDate + 4800 - theDay into theYear
 put item 2 of theDate + (12 * theDay) - 3 into theMonth
 put item 3 of theDate + \
((153 * theMonth + 2) div 5) + \
(365 * theYear) + \
(theYear div 4) - \
(theYear div 100) + \
(theYear div 400) - \
32045 into theDate
 break
   END SWITCH
   
   return theDate
END formatDate

FUNCTION formatTime theTime, theFormat
   /*
   accepts any valid time and returns the form of the time specified in the 
second parameter.
   The valid formats are:
   sql time: hh:mm:ss (Note: combining sql date from the formatDate() function 
with the
   sql time will produce a valid SQL date time type).
   short time: LC short time format
   abbreviated time: LC abbr time format (same as short time)
   long time: LC long time format
   seconds: the number of seconds since the prior midnight
   military: the military time 00:00 - 23:59
   */

   IF theTime is empty THEN return empty
   
   set the numberformat to "00"
   SWITCH theFormat
  CASE "sql time"
 convert theTime to dateitems
 put (item 4 of theTime +0) & ":" & \
(item 5 of theTime +0) & ":" & \
(item 6 of theTime +0) into theTime
 break
  CASE "short time"
 convert theTime to short time
 break
  CASE "abbreviated time"
 convert theTime to abbreviated time
 break
  CASE "long time"
 convert theTime to long time
 break
  CASE "seconds"
 convert theTime to seconds
 break
  CASE "military"
 set the itemdelimiter to ":"
 
 IF theTime contains "PM" THEN
add 12 to item 1 of theTime
 END IF
 
 put word 1 of item 2 of theTime into item 2 of theTime
 break
   END SWITCH
   
   return theTime
END formatTime

And as an added bonus, those who use Spiceworks know they format time for 
tickets as 0h0m0s. 

FUNCTION spiceTime pStartTime, pEndTime
   convert pStartTime to dateItems
   convert pEndTime to dateItems
   subtract item 4 of pStartTime from item 4 of pEndTime
   subtract item 5 of pStartTime from item 5 of pEndTime
   convert pEndTime from dateItems to short time
   put forma

Re: Convert date

2023-07-14 Thread Brian Milby via use-livecode
We actually do with LCB libraries (Icon SVG Library is one example), but with 
the caveat that they are not as performant as LCS code in many cases (compare 
the LCS and LCB implementations of JSON for example).  LCS libraries are doable 
too.  Just make everything internal private/script local and only expose the 
calls you want to be public.  We just don’t currently have a built in way to 
manage them like the LCB modules.

Brian Milby
br...@milby7.com

> On Jul 14, 2023, at 8:11 AM, Mark Smith via use-livecode 
>  wrote:
> 
> Which makes me think, it would be nice if we could have plug-in code 
> modules. Essentially a faceless widget that could be called to perform some 
> sort of action (with parameters). Completely encapsulated. Or is that “bat 
> crazy” as Mike would say 

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Convert date

2023-07-14 Thread Bob Sneidar via use-livecode
I beg to differ. Again, Livecode is a way to build both the tools and the 
product made by those tools. Livecode is NOT a collection of every conceivable 
tool for everything everyone wants to do. No language is. 

I think the LC dev team is far more useful to everyone if they focus on 
completing the projects they already have, and squashing the long standing and 
pervasive bugs that exist. 

I think if there is a fairly easy way to create the tool you need with the 
codeset you now have, then you would need a compelling reason, like dramatic 
performance increases to justify building it into the engine. 

Bob S


> On Jul 14, 2023, at 4:08 AM, Paul Dupuis via use-livecode 
>  wrote:
> 
> Yes to this. I have, lot so many developer, a set of functions to translate 
> to and from this date format.
> 
> We can all write our own or use ones others have provided, but it would be 
> nice if this was built into the language.
> 
> 
> On 7/13/2023 10:59 PM, Neville Smythe via use-livecode wrote:
>> Jacque: Nice! Particularly as a demonstration of the variety of ways to 
>> achieve an objective in LC and different coding styles. I’ll add the 
>> snippets to my own version.
>> 
>> The ISO date (aka sql date) format is my favourite because it avoids the 
>> ambiguity of the English/American ordering of day, month and mostly because 
>> it works for sorting. I could wish it were universally adopted.
>> 
>> Neville Smythe

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Convert date

2023-07-14 Thread Mark Smith via use-livecode
Which makes me think, it would be nice if we could have plug-in code modules. 
Essentially a faceless widget that could be called to perform some sort of 
action (with parameters). Completely encapsulated. Or is that “bat crazy” as 
Mike would say 

> On 14 Jul 2023, at 12:08 pm, Paul Dupuis via use-livecode 
>  wrote:
> 
> Yes to this. I have, lot so many developer, a set of functions to translate 
> to and from this date format.
> 
> We can all write our own or use ones others have provided, but it would be 
> nice if this was built into the language.
> 
> 
> On 7/13/2023 10:59 PM, Neville Smythe via use-livecode wrote:
>> Jacque: Nice! Particularly as a demonstration of the variety of ways to 
>> achieve an objective in LC and different coding styles. I’ll add the 
>> snippets to my own version.
>> 
>> The ISO date (aka sql date) format is my favourite because it avoids the 
>> ambiguity of the English/American ordering of day, month and mostly because 
>> it works for sorting. I could wish it were universally adopted.
>> 
>> Neville Smythe
>> 
>> 
>> 
>> 
>> ___
>> use-livecode mailing list
>> use-livecode@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription 
>> preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
> 
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Convert date

2023-07-14 Thread Paul Dupuis via use-livecode
Yes to this. I have, lot so many developer, a set of functions to 
translate to and from this date format.


We can all write our own or use ones others have provided, but it would 
be nice if this was built into the language.



On 7/13/2023 10:59 PM, Neville Smythe via use-livecode wrote:

Jacque: Nice! Particularly as a demonstration of the variety of ways to achieve 
an objective in LC and different coding styles. I’ll add the snippets to my own 
version.

The ISO date (aka sql date) format is my favourite because it avoids the 
ambiguity of the English/American ordering of day, month and mostly because it 
works for sorting. I could wish it were universally adopted.

Neville Smythe




___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode



___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Convert date

2023-07-13 Thread Neville Smythe via use-livecode
Jacque: Nice! Particularly as a demonstration of the variety of ways to achieve 
an objective in LC and different coding styles. I’ll add the snippets to my own 
version.

The ISO date (aka sql date) format is my favourite because it avoids the 
ambiguity of the English/American ordering of day, month and mostly because it 
works for sorting. I could wish it were universally adopted.

Neville Smythe




___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Convert date

2023-07-13 Thread ambassador--- via use-livecode
Neville Smythe wrote:
> I seem to have hallucinated that the built-in convert handler recognised
> the ISO date and dateTime formats (-MM-DD, -MM-DD 
> hh:mm:ss+-http://hh.ss, etc) but I must have written my own conversion
> routines in a former life.
> But one would have to ask… Why doesn’t it?
> After all, the original ISO 8601 standard was adopted 1988!

https://quality.livecode.com/show_bug.cgi?id=4636
 
-- 
 Richard Gaskin
 Fourth World Systems
 

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Convert date

2023-07-13 Thread J. Landman Gay via use-livecode

On 7/13/23 3:19 AM, Neville Smythe via use-livecode wrote:

I seem to have hallucinated that the built-in convert handler recognised the 
ISO date and dateTime formats (-MM-DD, -MM-DD hh:mm:ss+-hh.ss, etc) but 
I must have written my own conversion routines in a former life.

But one would have to ask… Why doesn’t it? After all, the original ISO 8601 
standard was adopted 1988!


I've been collecting handlers for this for some years. I have four now. I didn't note where the 
first two came from, but here's what I have:


on formatTime
  put the long time into tTime
  convert tTime to dateItems
  split tTime by ","
  return format("%02d:%02d:%02d",tTime[4],tTime[5],tTime[6])
end formatTime


function sqlDate pDate
  convert pDate to dateitems
  set the numberformat to "00"
  return merge("[[item 1 of pDate]]-[[item 2 of pDate + 0]]-[[item 3 of pDate + 
0]]")
end sqlDate



-- Mark Waddingham, sql date and time:

function convertDateTimeToISO pDateTime
  local tTimeZone
  convert pDateTime to internet date
  put the last word of pDateTime into tTimeZOne
  convert pDateTime to dateitems
  return format("%04d-%02d-%02d %02d:%02d:%02d%s", \
item 1 of pDateTime, item 2 of pDateTime, item 3 of pDateTime, \
item 4 of pDateTime, item 5 of pDateTime, item 6 of pDateTime, 
tTimeZone)
end convertDateTimeToISO


-- Klaus Major, using seconds:
function smpt_lite tSecs
   return format("%02d:%02d:%02d", tSecs div 3600, (tSecs mod 3600) div 60,
tSecs mod 60)
end smpt_lite

--
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software   | http://www.hyperactivesw.com

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Convert date

2023-07-13 Thread Mark Smith via use-livecode
Thanks Bob. Sounds very useful. How does one access (or locate) the master 
library?

Cheers,
Mark


Sent from my iPhone

> On Jul 13, 2023, at 4:24 PM, Bob Sneidar via use-livecode 
>  wrote:
> 
> I wrote a formatDate function years ago that called this "sql date". Maybe I 
> should rename it “ISO Date” or just add a case for it. There is also an “sql 
> time” format in the function formatTime. This way you can put format date(the 
> date, “sql date”) && formative(the time, “sql time”) to get an sql datetime 
> format for a database column. They should be in the Master Library.
> 
> I suppose a lot of things could be done by the engine, but as was discussed 
> years ago, what LC is NOT is a development environment that does almost 
> anything. What it IS is a development environment that has the TOOLS to do 
> almost anything.
> 
> Bob S
> 
> 
> On Jul 13, 2023, at 1:19 AM, Neville Smythe via use-livecode 
>  wrote:
> 
> I seem to have hallucinated that the built-in convert handler recognised the 
> ISO date and dateTime formats (-MM-DD, -MM-DD hh:mm:ss+-hh.ss, etc) 
> but I must have written my own conversion routines in a former life.
> 
> But one would have to ask… Why doesn’t it? After all, the original ISO 8601 
> standard was adopted 1988!
> 
> Neville Smythe
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Convert date

2023-07-13 Thread Bob Sneidar via use-livecode
I wrote a formatDate function years ago that called this "sql date". Maybe I 
should rename it “ISO Date” or just add a case for it. There is also an “sql 
time” format in the function formatTime. This way you can put format date(the 
date, “sql date”) && formative(the time, “sql time”) to get an sql datetime 
format for a database column. They should be in the Master Library.

I suppose a lot of things could be done by the engine, but as was discussed 
years ago, what LC is NOT is a development environment that does almost 
anything. What it IS is a development environment that has the TOOLS to do 
almost anything.

Bob S


On Jul 13, 2023, at 1:19 AM, Neville Smythe via use-livecode 
 wrote:

I seem to have hallucinated that the built-in convert handler recognised the 
ISO date and dateTime formats (-MM-DD, -MM-DD hh:mm:ss+-hh.ss, etc) but 
I must have written my own conversion routines in a former life.

But one would have to ask… Why doesn’t it? After all, the original ISO 8601 
standard was adopted 1988!

Neville Smythe

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Convert date

2023-07-13 Thread Neville Smythe via use-livecode
I seem to have hallucinated that the built-in convert handler recognised the 
ISO date and dateTime formats (-MM-DD, -MM-DD hh:mm:ss+-hh.ss, etc) but 
I must have written my own conversion routines in a former life.

But one would have to ask… Why doesn’t it? After all, the original ISO 8601 
standard was adopted 1988!

Neville Smythe


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: LC Date Conversions post 2035

2022-11-09 Thread Bob Sneidar via use-livecode
Probably based on Unix... ;-)

Bob S


On Nov 7, 2022, at 06:55 , Martin Koob via use-livecode 
mailto:use-livecode@lists.runrev.com>> wrote:

Not sure what Window is doing that it is only going to work till 3000.  Maybe 
MicroSoft have decided to EOL Windows  then and have plans to release a totally 
rewritten operating system then.


Martin

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Date formats macOS Ventura

2022-11-08 Thread Mark Smith via use-livecode
Hi Mattias,

That is a terrific bit of sleuthing on your part so thanks for sharing. (and 
lets hope those options come back in future versions. It’s very strange that 
they would remove them.)

Mark


> On 8 Nov 2022, at 9:21 am, matthias rebbe via use-livecode 
>  wrote:
> 
> Hello,
> 
> Mark Clark's post 'LC Date Conversions post 2035 [OT ish]" made me play a 
> little bit with 'the date' in LC.
> 
> I have macOS Ventura installed and noticed that the system date had a 2 digit 
> year in LC.
> 
> So i went to the Control Pane to customize the date format. Unfortunately I 
> had to realize that you no longer can set a user-defined date format or 
> number format in Ventura.
> 
> Here in my German version of Ventura i could only choose between  dd.MM.yy 
> and yyy-MM-dd. There is no way to customize
> the date and number format as it was possible with previous versions of macOS.
> In my case i am in need of the date format dd.MM.
> 
> I contacted the Apple support about this and it seems they even were not 
> aware that this was changed in Ventura. They asked me to do a safe boot,
> create a new user account and finally they wanted me to reinstall Ventura, 
> which i denied, because i was sure, that this has nothing to do with a faulty 
> installation, but with Ventura itself.
> 
> Anyway, i searched the whole evening yesterday and found a  post in the apple 
> forums
> https://discussions.apple.com/thread/254316210
> which has a workaround for this.
> 
> In short.
> 
> Method 1
> Either edit the file 
> /Users/matthias/Library/Preferences/.GlobalPreferences.plist
> and add
> AppleICUDateFormatStrings
>   
>   1
>   ##custom date format##
>   
> 
> and replace ##custom date format## with you desired format. You can even add 
> more format by increasing the  value
> 
> AppleICUDateFormatStrings
>   
>   1
>   ##custom date format##
>   2
>   ##custom date forma2t##
>   
> and so on...
> 
> After saving you have to logout and login again to get the settings active.
> 
> Method 2
> Another way is to use the shell. Using the shell does not need to logout and 
> login again.
> 
> defaults write NSGlobalDomain AppleICUDateFormatStrings -dict-add "1" 
> "dd.MM."
> defaults write NSGlobalDomain AppleICUDateFormatStrings -dict-add "2" 
> "dd.MM.yy"
> defaults write NSGlobalDomain AppleICUDateFormatStrings -dict-add "3" "dd 
>  y"
> defaults write NSGlobalDomain AppleICUDateFormatStrings -dict-add "4" "EEEE, 
> d  y"
> 
> 
> After you have set the date format using method 1 or 2, you will not see any 
> "selected" date format in the region settins in the Control Panel, because 
> the Control Panel does not support that anymore. The "field" is empty.
> As soon as you select a date format in the Control Panel, your previous 
> settings from method 1 or 2  are overwritten and not used anymore. In this 
> case you have to rerun one of the above steps.
> 
> Maybe this is of help for one or the other.
> 
> Regards,
> Matthias
> 
> 
> 
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Date formats macOS Ventura

2022-11-08 Thread matthias rebbe via use-livecode
Hello,

Mark Clark's post 'LC Date Conversions post 2035 [OT ish]" made me play a 
little bit with 'the date' in LC.

I have macOS Ventura installed and noticed that the system date had a 2 digit 
year in LC.

So i went to the Control Pane to customize the date format. Unfortunately I had 
to realize that you no longer can set a user-defined date format or number 
format in Ventura.

Here in my German version of Ventura i could only choose between  dd.MM.yy and 
yyy-MM-dd. There is no way to customize
the date and number format as it was possible with previous versions of macOS.
In my case i am in need of the date format dd.MM.

I contacted the Apple support about this and it seems they even were not aware 
that this was changed in Ventura. They asked me to do a safe boot,
create a new user account and finally they wanted me to reinstall Ventura, 
which i denied, because i was sure, that this has nothing to do with a faulty 
installation, but with Ventura itself.

Anyway, i searched the whole evening yesterday and found a  post in the apple 
forums
https://discussions.apple.com/thread/254316210
which has a workaround for this.

In short.

Method 1
Either edit the file 
/Users/matthias/Library/Preferences/.GlobalPreferences.plist
and add
AppleICUDateFormatStrings

1
##custom date format##


and replace ##custom date format## with you desired format. You can even add 
more format by increasing the  value

AppleICUDateFormatStrings

1
##custom date format##
2
##custom date forma2t##

and so on...

After saving you have to logout and login again to get the settings active.

Method 2
Another way is to use the shell. Using the shell does not need to logout and 
login again.

defaults write NSGlobalDomain AppleICUDateFormatStrings -dict-add "1" 
"dd.MM."
defaults write NSGlobalDomain AppleICUDateFormatStrings -dict-add "2" "dd.MM.yy"
defaults write NSGlobalDomain AppleICUDateFormatStrings -dict-add "3" "dd  
y"
defaults write NSGlobalDomain AppleICUDateFormatStrings -dict-add "4" ", d 
 y"


After you have set the date format using method 1 or 2, you will not see any 
"selected" date format in the region settins in the Control Panel, because the 
Control Panel does not support that anymore. The "field" is empty.
As soon as you select a date format in the Control Panel, your previous 
settings from method 1 or 2  are overwritten and not used anymore. In this case 
you have to rerun one of the above steps.

Maybe this is of help for one or the other.

Regards,
Matthias
 



___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


RE: LC Date Conversions post 2035 [OT ish]

2022-11-07 Thread Ralph DiMola via use-livecode
Interesting... On my Outlook the received date is used to sort emails but on
my phone the "date" field in the header is used for both sorting and
displaying in the list. So on my phone this email will be at the top until
31 Dec 2034.

This just reinforces that the interpretation of internet mail headers is
still not consistent. (and maybe should have had a little more thought
before the barn doors were opened)
 
Ralph DiMola
IT Director
Evergreen Information Services
rdim...@evergreeninfo.net


-Original Message-
From: use-livecode [mailto:use-livecode-boun...@lists.runrev.com] On Behalf
Of Mark Clark via use-livecode
Sent: Sunday, December 31, 2034 9:25 PM
To: How to use LiveCode
Cc: Mark Clark
Subject: LC Date Conversions post 2035

I was testing one of the tools I use to handle licensing today and decided
to run the series through a few iterations adding 2 years at a time. I
noticed that my dates were reverting to the 20th c. Hmm, whoops.

After a bit of head scratching I decided it wasn't just my doing.

Date conversion sort of works but the output can lead to trouble in the
future. I've done a few tests and some lengthy, but if anyone cares to
perform the "short test," please do.

Change your date to 12/31/2034; then change to 2035. 



run this:  

put the date into test
convert test to dateitems

answer item 1 of test --works in 2034; broken in 2035


Mark



___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: LC Date Conversions post 2035

2022-11-07 Thread Paul Dupuis via use-livecode
The results on Windows may also depend upon whether you built a 32 bit 
standalone or a 64 bit standalone? Or using the 32 or 64 bit version of 
whatever release of Livecode is being used.


On 11/7/2022 9:55 AM, Martin Koob via use-livecode wrote:

Hi

This thread reminded me of some sci-fi show show I was watching which 
referenced the collapse of society on earth caused by a bug around 2035 or 
something like that where the computers could not process dates beyond that.   
I thought this is just a off hand reference to something Y2K.

But I did a quick search turned up this:

https://en.wikipedia.org/wiki/Year_2038_problem

So a signed 32 bit number counting the seconds since Jan 1, 1970 will overflow after 
03:14:07 UTC <https://en.wikipedia.org/wiki/Coordinated_Universal_Time> on 19 
January 2038.

So if it was in referencing  that date and time in 2038 that your problem 
showed up then maybe that was the cause.  But that would not explain it if the 
date things started going wrong was in 2035.

But it appears from the tests that Andreas did on Windows 10 and MacOS 12.6 
that they have already resolved the Year 2038 problem.

Maybe the MacOS is using a 64 bit number now for the Unix time.  According to 
wikipedia

"though many modern systems have been upgraded to measure Unix time with signed 
64-bit <https://en.wikipedia.org/wiki/64-bit_computing> integers which will not 
overflow for 292 billion years.”

Not sure what Window is doing that it is only going to work till 3000.  Maybe 
MicroSoft have decided to EOL Windows  then and have plans to release a totally 
rewritten operating system then.


Martin



On Nov 7, 2022, at 2:49 AM, Andreas Bergendal via use-livecode 
 wrote:

But how far does the 4-digit conversion work? Here’s what I’ve found:
- On Windows 10, it works until year 3000, and stops working on year 3001 (it 
just returns the input without converting).
- On MacOS 12.6 it works at least until year 2.100.000.000 (which is a Sunday… 
:). By that time we should be expecting LC v14 or something, or maybe that LC 
rules the galaxy, so I hope that’s sorted by then… :D

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode



___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: LC Date Conversions post 2035

2022-11-07 Thread Martin Koob via use-livecode
Hi

This thread reminded me of some sci-fi show show I was watching which 
referenced the collapse of society on earth caused by a bug around 2035 or 
something like that where the computers could not process dates beyond that.   
I thought this is just a off hand reference to something Y2K. 

But I did a quick search turned up this:

https://en.wikipedia.org/wiki/Year_2038_problem

So a signed 32 bit number counting the seconds since Jan 1, 1970 will overflow 
after 03:14:07 UTC <https://en.wikipedia.org/wiki/Coordinated_Universal_Time> 
on 19 January 2038.

So if it was in referencing  that date and time in 2038 that your problem 
showed up then maybe that was the cause.  But that would not explain it if the 
date things started going wrong was in 2035.

But it appears from the tests that Andreas did on Windows 10 and MacOS 12.6 
that they have already resolved the Year 2038 problem.

Maybe the MacOS is using a 64 bit number now for the Unix time.  According to 
wikipedia

"though many modern systems have been upgraded to measure Unix time with signed 
64-bit <https://en.wikipedia.org/wiki/64-bit_computing> integers which will not 
overflow for 292 billion years.”

Not sure what Window is doing that it is only going to work till 3000.  Maybe 
MicroSoft have decided to EOL Windows  then and have plans to release a totally 
rewritten operating system then.


Martin


> On Nov 7, 2022, at 2:49 AM, Andreas Bergendal via use-livecode 
>  wrote:
> 
> But how far does the 4-digit conversion work? Here’s what I’ve found:
> - On Windows 10, it works until year 3000, and stops working on year 3001 (it 
> just returns the input without converting).
> - On MacOS 12.6 it works at least until year 2.100.000.000 (which is a 
> Sunday… :). By that time we should be expecting LC v14 or something, or maybe 
> that LC rules the galaxy, so I hope that’s sorted by then… :D

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: LC Date Conversions post 2035

2022-11-07 Thread Mark Clark via use-livecode
Thanks for the quick responses. In this case I did indeed use a 4 digit year as 
initial input (always), but still managed to shoot myself with a second 
conversion step. 

Converted my nicely formed input text to dateitems -- all good. Did my addition 
for renewal days to item 3. Check. Then I converted that back to date. Uh oh, 
not check. Should have been long date.

If we had it to do all over again I'd say let's make the function date always 
be the full year and only using the form short date would get you the two digit 
year. Long date would remain unchanged.

Or, ya know, I could just pay better attention! ;)

Mark

 



On Nov 7, 2022, at 3:43 AM, J. Landman Gay via use-livecode 
mailto:use-livecode@lists.runrev.com>> wrote:

That's the centuryCutoff in action, but I think something is amiss since it's 
only supposed to apply to 2-digit years and you supply a 4-digit year.
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: LC Date Conversions post 2035

2022-11-06 Thread Andreas Bergendal via use-livecode
Had to test this out of curiosity. Indeed, when using 2-digit year, that is the 
result, as expected and explained in the dictionary entry for centuryCutoff.

But how far does the 4-digit conversion work? Here’s what I’ve found:
- On Windows 10, it works until year 3000, and stops working on year 3001 (it 
just returns the input without converting).
- On MacOS 12.6 it works at least until year 2.100.000.000 (which is a Sunday… 
:). By that time we should be expecting LC v14 or something, or maybe that LC 
rules the galaxy, so I hope that’s sorted by then… :D
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: LC Date Conversions post 2035

2022-11-06 Thread J. Landman Gay via use-livecode
That's the centuryCutoff in action, but I think something is amiss since 
it's only supposed to apply to 2-digit years and you supply a 4-digit year.


--
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
On November 6, 2022 8:28:34 PM Mark Clark via use-livecode 
 wrote:


I was testing one of the tools I use to handle licensing today and decided 
to run the series through a few iterations adding 2 years at a time. I 
noticed that my dates were reverting to the 20th c. Hmm, whoops.


After a bit of head scratching I decided it wasn't just my doing.

Date conversion sort of works but the output can lead to trouble in the 
future. I've done a few tests and some lengthy, but if anyone cares to 
perform the "short test," please do.


Change your date to 12/31/2034; then change to 2035.



run this:

put the date into test
convert test to dateitems

answer item 1 of test --works in 2034; broken in 2035


Mark



___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your 
subscription preferences:

http://lists.runrev.com/mailman/listinfo/use-livecode





___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: LC Date Conversions post 2035

2022-11-06 Thread J. Landman Gay via use-livecode
That's the centuryCutoff property in action, but it's only supposed to 
apply to 2-digit years. So I think something is amiss since you supply a 
4-digit year.



--
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
On November 6, 2022 8:28:34 PM Mark Clark via use-livecode 
 wrote:


I was testing one of the tools I use to handle licensing today and decided 
to run the series through a few iterations adding 2 years at a time. I 
noticed that my dates were reverting to the 20th c. Hmm, whoops.


After a bit of head scratching I decided it wasn't just my doing.

Date conversion sort of works but the output can lead to trouble in the 
future. I've done a few tests and some lengthy, but if anyone cares to 
perform the "short test," please do.


Change your date to 12/31/2034; then change to 2035.



run this:

put the date into test
convert test to dateitems

answer item 1 of test --works in 2034; broken in 2035


Mark



___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your 
subscription preferences:

http://lists.runrev.com/mailman/listinfo/use-livecode





___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


LC Date Conversions post 2035

2022-11-06 Thread Mark Clark via use-livecode
I was testing one of the tools I use to handle licensing today and decided to 
run the series through a few iterations adding 2 years at a time. I noticed 
that my dates were reverting to the 20th c. Hmm, whoops.

After a bit of head scratching I decided it wasn't just my doing.

Date conversion sort of works but the output can lead to trouble in the future. 
I've done a few tests and some lengthy, but if anyone cares to perform the 
"short test," please do.

Change your date to 12/31/2034; then change to 2035. 



run this:  

put the date into test
convert test to dateitems

answer item 1 of test --works in 2034; broken in 2035


Mark



___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: RegEx to convert standard date to sql date

2022-10-03 Thread Bob Sneidar via use-livecode
Thanks I'll try that. Looks like just what I neeed.

Bob S


On Oct 1, 2022, at 04:30 , Kaveh 
mailto:ka...@rivervalleytechnologies.com>> 
wrote:

Search for
(\d\d)\/(\d\d)\/(\d\d\d\d)
replace with
\3\1\2

See here<https://regex101.com/r/yleq5u/1>

On Fri, 30 Sept 2022 at 23:46, Bob Sneidar via use-livecode 
mailto:use-livecode@lists.runrev.com>> wrote:
Well it's like this. I am working in a document management system, and when I 
capture a date, I want to convert it to an sql date. I am not working in 
Livecode for this.

Bob S


> On Sep 30, 2022, at 10:38 , Jacques Clavel via use-livecode 
> mailto:use-livecode@lists.runrev.com>> wrote:
>
> Why not :
> set itemdel to "/"
> get tDate
> put item 3 of it & item 1 of it & item 2 of it into tSql
>
> JC
>
> Le ven. 30 sept. 2022 à 19:13, Bob Sneidar via use-livecode <
> use-livecode@lists.runrev.com<mailto:use-livecode@lists.runrev.com>> a écrit :
>
>> I'm trying to convert a date format like mm/dd/ to an sql date format
>> mmdd. Any ideas? Nothing I found on the interwebs seems to work.
>>
>> Bob S
>>
>>
>> ___
>> use-livecode mailing list
>> use-livecode@lists.runrev.com<mailto:use-livecode@lists.runrev.com>
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>
>
>
> --
> Jacques Clavel
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com<mailto:use-livecode@lists.runrev.com>
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

___
use-livecode mailing list
use-livecode@lists.runrev.com<mailto:use-livecode@lists.runrev.com>
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


--
Kaveh Bazargan PhD
Director
River Valley Technologies<http://rivervalley.io/> ● 
Twitter<https://twitter.com/rivervalley1000> ● 
LinkedIn<https://www.linkedin.com/in/bazargankaveh/> ● 
ORCID<https://orcid.org/-0002-1414-9098>
Accelerating the Communication of Research

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: RegEx to convert standard date to sql date

2022-10-01 Thread Kaveh via use-livecode
Search for
(\d\d)\/(\d\d)\/(\d\d\d\d)
replace with
\3\1\2

See here <https://regex101.com/r/yleq5u/1>

On Fri, 30 Sept 2022 at 23:46, Bob Sneidar via use-livecode <
use-livecode@lists.runrev.com> wrote:

> Well it's like this. I am working in a document management system, and
> when I capture a date, I want to convert it to an sql date. I am not
> working in Livecode for this.
>
> Bob S
>
>
> > On Sep 30, 2022, at 10:38 , Jacques Clavel via use-livecode <
> use-livecode@lists.runrev.com> wrote:
> >
> > Why not :
> > set itemdel to "/"
> > get tDate
> > put item 3 of it & item 1 of it & item 2 of it into tSql
> >
> > JC
> >
> > Le ven. 30 sept. 2022 à 19:13, Bob Sneidar via use-livecode <
> > use-livecode@lists.runrev.com> a écrit :
> >
> >> I'm trying to convert a date format like mm/dd/ to an sql date
> format
> >> mmdd. Any ideas? Nothing I found on the interwebs seems to work.
> >>
> >> Bob S
> >>
> >>
> >> ___
> >> use-livecode mailing list
> >> use-livecode@lists.runrev.com
> >> Please visit this url to subscribe, unsubscribe and manage your
> >> subscription preferences:
> >> http://lists.runrev.com/mailman/listinfo/use-livecode
> >>
> >
> >
> > --
> > Jacques Clavel
> > ___
> > use-livecode mailing list
> > use-livecode@lists.runrev.com
> > Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> > http://lists.runrev.com/mailman/listinfo/use-livecode
>
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>


-- 
Kaveh Bazargan PhD
Director
River Valley Technologies <http://rivervalley.io> ● Twitter
<https://twitter.com/rivervalley1000> ● LinkedIn
<https://www.linkedin.com/in/bazargankaveh/> ● ORCID
<https://orcid.org/-0002-1414-9098>
*Accelerating the Communication of Research*
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: RegEx to convert standard date to sql date

2022-09-30 Thread Bob Sneidar via use-livecode
Well it's like this. I am working in a document management system, and when I 
capture a date, I want to convert it to an sql date. I am not working in 
Livecode for this. 

Bob S


> On Sep 30, 2022, at 10:38 , Jacques Clavel via use-livecode 
>  wrote:
> 
> Why not :
> set itemdel to "/"
> get tDate
> put item 3 of it & item 1 of it & item 2 of it into tSql
> 
> JC
> 
> Le ven. 30 sept. 2022 à 19:13, Bob Sneidar via use-livecode <
> use-livecode@lists.runrev.com> a écrit :
> 
>> I'm trying to convert a date format like mm/dd/ to an sql date format
>> mmdd. Any ideas? Nothing I found on the interwebs seems to work.
>> 
>> Bob S
>> 
>> 
>> ___
>> use-livecode mailing list
>> use-livecode@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>> 
> 
> 
> -- 
> Jacques Clavel
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: RegEx to convert standard date to sql date

2022-09-30 Thread Tom Glod via use-livecode
Regex is overkill for this . i would handcode the translation like
Keith mentioned.

On Fri, Sep 30, 2022 at 1:42 PM Keith Clarke via use-livecode <
use-livecode@lists.runrev.com> wrote:

> If it's always this standard string 'tDate' why not avoid Regex and just
> set the delimiters of tDate to "/" and then put item 3 of tDate & item 2 of
> tDate and put item 1 of tDate?
> Best,
> Keith
>
> > On 30 Sep 2022, at 18:13, Bob Sneidar via use-livecode <
> use-livecode@lists.runrev.com> wrote:
> >
> > I'm trying to convert a date format like mm/dd/ to an sql date
> format mmdd. Any ideas? Nothing I found on the interwebs seems to work.
> >
> > Bob S
> >
> >
> > ___
> > use-livecode mailing list
> > use-livecode@lists.runrev.com
> > Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> > http://lists.runrev.com/mailman/listinfo/use-livecode
>
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: RegEx to convert standard date to sql date

2022-09-30 Thread Keith Clarke via use-livecode
If it's always this standard string 'tDate' why not avoid Regex and just set 
the delimiters of tDate to "/" and then put item 3 of tDate & item 2 of tDate 
and put item 1 of tDate?
Best,
Keith 

> On 30 Sep 2022, at 18:13, Bob Sneidar via use-livecode 
>  wrote:
> 
> I'm trying to convert a date format like mm/dd/ to an sql date format 
> mmdd. Any ideas? Nothing I found on the interwebs seems to work. 
> 
> Bob S
> 
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: RegEx to convert standard date to sql date

2022-09-30 Thread Jacques Clavel via use-livecode
Why not :
set itemdel to "/"
get tDate
put item 3 of it & item 1 of it & item 2 of it into tSql

JC

Le ven. 30 sept. 2022 à 19:13, Bob Sneidar via use-livecode <
use-livecode@lists.runrev.com> a écrit :

> I'm trying to convert a date format like mm/dd/ to an sql date format
> mmdd. Any ideas? Nothing I found on the interwebs seems to work.
>
> Bob S
>
>
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>


-- 
Jacques Clavel
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


RegEx to convert standard date to sql date

2022-09-30 Thread Bob Sneidar via use-livecode
I'm trying to convert a date format like mm/dd/ to an sql date format 
mmdd. Any ideas? Nothing I found on the interwebs seems to work. 

Bob S


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Setting Creation Date of file to a past date?

2021-03-15 Thread Mark Wieder via use-livecode

Sean-

Thanks. I didn't know about SetFile.

--
 Mark Wieder
 ahsoftw...@gmail.com

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Setting Creation Date of file to a past date?

2021-03-15 Thread Sean Cole (Pi) via use-livecode
I used quotes wrong, use this:

>From LC, use:
put "powershell -command ^(Get-Item 'C:\Folder\File.txt').CreationTime=('31
December 2019 23:59:59')^" into tShell
replace "^" with quote in tShell
get shell(tShell)

Sean

On Tue, 16 Mar 2021 at 03:57, Sean Cole (Pi)  wrote:

> Touch tells it to update to now unless the date set is in the past and you
> use the -d modifier.
>
> If you install the Command Line Tools package from Apple on a mac you can
> use the much better   SetFile -d '12/31/1999 23:59:59' file.txt
>
>
> On windoze, using powershell, send the command:
> (Get-Item "C:\Folder\File.txt").CreationTime=("31 December 2019 23:59:59")
>
> From LC, use:
> put "powershell -command '(Get-Item
> 'C:\Folder\File.txt').CreationTime=('31 December 2019 23:59:59')' into
> tShell
> replace "'" with quote in tShell
> get shell(tShell)
>
> Sean
>
> On Tue, 16 Mar 2021 at 01:35, Mark Wieder via use-livecode <
> use-livecode@lists.runrev.com> wrote:
>
>> On 3/14/21 4:41 PM, matthias rebbe via use-livecode wrote:
>> > Windows unfortunately does not include such a command line tool
>>
>> I am astounded to find there is no touch command for Win.
>> However, there does appear to be a solution for Windows (untested) using
>> commandline options for the copy command:
>>
>> date desiredDate
>> copy /b filename.ext +,,
>>
>>
>> https://superuser.com/questions/10426/windows-equivalent-of-the-linux-command-touch/764716
>>
>> --
>>   Mark Wieder
>>   ahsoftw...@gmail.com
>>
>> ___
>> use-livecode mailing list
>> use-livecode@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>
>
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Setting Creation Date of file to a past date?

2021-03-15 Thread Sean Cole (Pi) via use-livecode
Touch tells it to update to now unless the date set is in the past and you
use the -d modifier.

If you install the Command Line Tools package from Apple on a mac you can
use the much better   SetFile -d '12/31/1999 23:59:59' file.txt


On windoze, using powershell, send the command:
(Get-Item "C:\Folder\File.txt").CreationTime=("31 December 2019 23:59:59")

>From LC, use:
put "powershell -command '(Get-Item 'C:\Folder\File.txt').CreationTime=('31
December 2019 23:59:59')' into tShell
replace "'" with quote in tShell
get shell(tShell)

Sean

On Tue, 16 Mar 2021 at 01:35, Mark Wieder via use-livecode <
use-livecode@lists.runrev.com> wrote:

> On 3/14/21 4:41 PM, matthias rebbe via use-livecode wrote:
> > Windows unfortunately does not include such a command line tool
>
> I am astounded to find there is no touch command for Win.
> However, there does appear to be a solution for Windows (untested) using
> commandline options for the copy command:
>
> date desiredDate
> copy /b filename.ext +,,
>
>
> https://superuser.com/questions/10426/windows-equivalent-of-the-linux-command-touch/764716
>
> --
>   Mark Wieder
>   ahsoftw...@gmail.com
>
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Setting Creation Date of file to a past date?

2021-03-15 Thread Mark Wieder via use-livecode

On 3/14/21 4:41 PM, matthias rebbe via use-livecode wrote:

Windows unfortunately does not include such a command line tool


I am astounded to find there is no touch command for Win.
However, there does appear to be a solution for Windows (untested) using 
commandline options for the copy command:


date desiredDate
copy /b filename.ext +,,

https://superuser.com/questions/10426/windows-equivalent-of-the-linux-command-touch/764716

--
 Mark Wieder
 ahsoftw...@gmail.com

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Setting Creation Date of file to a past date?

2021-03-14 Thread matthias rebbe via use-livecode
Windows unfortunately does not include such a command line tool, but it should 
be possible to do that with a powershell command which is executed with the 
Shell() function.

so for example this command here

put shell("powershell (ls c:/users/matthias/test.txt).CreationTime = get-date 
2019-12-24-00:00")

would change the creation date of the file c:/users/matthias/test.txt) to the 
24th December 2019 at 00:00

If you want to change the last modification time instead of the creation time 
then use  the parameter LastWriteTime instead of CreationTime

put shell("powershell (ls c:/users/matthias/test.txt).LastWriteTime = get-date 
2019-12-24-00:00")

-
Matthias Rebbe
Life Is Too Short For Boring Code

> Am 14.03.2021 um 23:28 schrieb Phil Davis via use-livecode 
> :
> 
> On Mac or Linux you can use the "touch" shell command - not sure if it's 
> available on Windows. You can download the "Shell Command Help" LC plugin to 
> simplify access to info about it.
> 
> Phil Davis
> 
> 
> On 3/14/21 1:04 PM, Michael Kristensen via use-livecode wrote:
>> Hi there
>> 
>> I want to create/export some images from Livecode to fit into a slideshow 
>> that is sorted by creation date.
>> 
>> It means that the files I export shall have a creation date of the past. So 
>> that when they are put into the folder of the slideshow, the images are 
>> placed automatically at the desired places.
>> 
>> How would you go about to set the creation date of a file to a date in the 
>> past with Livecode (maybe with the help of shell or applescript)
>> 
>> Thanks
>> Michael
>> ___
>> use-livecode mailing list
>> use-livecode@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription 
>> preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>> 
> 
> -- 
> Phil Davis
> 503-307-4363
> 
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Setting Creation Date of file to a past date?

2021-03-14 Thread Phil Davis via use-livecode
On Mac or Linux you can use the "touch" shell command - not sure if it's 
available on Windows. You can download the "Shell Command Help" LC 
plugin to simplify access to info about it.


Phil Davis


On 3/14/21 1:04 PM, Michael Kristensen via use-livecode wrote:

Hi there

I want to create/export some images from Livecode to fit into a slideshow that 
is sorted by creation date.

It means that the files I export shall have a creation date of the past. So 
that when they are put into the folder of the slideshow, the images are placed 
automatically at the desired places.

How would you go about to set the creation date of a file to a date in the past 
with Livecode (maybe with the help of shell or applescript)

Thanks
Michael
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode



--
Phil Davis
503-307-4363


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Setting Creation Date of file to a past date?

2021-03-14 Thread Michael Kristensen via use-livecode
Hi there

I want to create/export some images from Livecode to fit into a slideshow that 
is sorted by creation date.

It means that the files I export shall have a creation date of the past. So 
that when they are put into the folder of the slideshow, the images are placed 
automatically at the desired places.

How would you go about to set the creation date of a file to a date in the past 
with Livecode (maybe with the help of shell or applescript)

Thanks
Michael
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: sorting lines by date

2020-07-12 Thread David V Glasgow via use-livecode
Thanks everyone & Curry.  I will play with this some more.  Looking at the 
lists I am given, most of the date columns are declared to be UTC.  I intended 
to try to detect other formats in due course, but thought I’d start with the 
common one.

Reminds me of my favourite Jake Peralta line: “Stupid rest of the world, 
writing their dates all dumb!”

Cheers, and thanks again.

David G

> On 11 Jul 2020, at 7:06 pm, Curry Kenworthy via use-livecode 
>  wrote:
> 
> 
> Like everything field and text related, this thread caught my eye! :)
> 
> One of my favorite areas of LiveCode, and also one of the areas I have to 
> actively keep an eye on since I rely on it a lot.
> 
> Here's an observation that might help in one way or another
> 
> David:
> 
> > http://adomain/ 27/06/2016 8:10
> 
> > set itemdel to tab
> > sort lines of field "import" datetime by the last item of each
> 
> > the order above is generated.
> > I can’t see any meaningful ordering of the lines.
> 
> I was curious and copied your content into a field where I changed the date 
> format of the dates, like so:
> 
> http://adomain/   06/27/2016 8:10
> http://adomain/   11/17/2013 22:18
> 
> And for me, over here on this side of the ocean (cue Trump rally: USA! USA!) 
> that both looks good, and works well, using your unmodified code. The lines 
> without a date also stacked up at the top, as you predicted, and as I know to 
> be the normal LC sort behavior.
> 
> I realize you need the British format, but again out of curiosity and to make 
> sure everything LC datewise is working properly, you might try your sort 
> again, with a few lines of your content and that modification.
> 
> (There is also a useSystemDate keyword that you could test.)
> 
> Regardless, be assured that ABSOLUTELY it is possible to have datetime sorts 
> working well in fields or text with tabbed columns. Have no doubts or fears 
> in that regard. I very recently delivered a client project, this year, with 
> that feature.
> 
> The only question is efficiency. It would be better and faster to get the 
> datetime sort working directly with your content.
> 
> But if not, you can also sort with a custom function, and then the sky is the 
> limit! LC sort really is powerful and flexible.
> 
> But I would like to know the outcome, so when this is resolved, thanks in 
> advance for posting again to let us know what worked!
> 
> Best wishes,
> 
> Curry Kenworthy
> 
> Custom Software Development
> "Better Methods, Better Results"
> LiveCode Training and Consulting
> http://livecodeconsulting.com/
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: sorting lines by date

2020-07-11 Thread Curry Kenworthy via use-livecode


Like everything field and text related, this thread caught my eye! :)

One of my favorite areas of LiveCode, and also one of the areas I have 
to actively keep an eye on since I rely on it a lot.


Here's an observation that might help in one way or another

David:

> http://adomain/27/06/2016 8:10

> set itemdel to tab
> sort lines of field "import" datetime by the last item of each

> the order above is generated.
> I can’t see any meaningful ordering of the lines.

I was curious and copied your content into a field where I changed the 
date format of the dates, like so:


http://adomain/ 06/27/2016 8:10
http://adomain/ 11/17/2013 22:18

And for me, over here on this side of the ocean (cue Trump rally: USA! 
USA!) that both looks good, and works well, using your unmodified code. 
The lines without a date also stacked up at the top, as you predicted, 
and as I know to be the normal LC sort behavior.


I realize you need the British format, but again out of curiosity and to 
make sure everything LC datewise is working properly, you might try your 
sort again, with a few lines of your content and that modification.


(There is also a useSystemDate keyword that you could test.)

Regardless, be assured that ABSOLUTELY it is possible to have datetime 
sorts working well in fields or text with tabbed columns. Have no doubts 
or fears in that regard. I very recently delivered a client project, 
this year, with that feature.


The only question is efficiency. It would be better and faster to get 
the datetime sort working directly with your content.


But if not, you can also sort with a custom function, and then the sky 
is the limit! LC sort really is powerful and flexible.


But I would like to know the outcome, so when this is resolved, thanks 
in advance for posting again to let us know what worked!


Best wishes,

Curry Kenworthy

Custom Software Development
"Better Methods, Better Results"
LiveCode Training and Consulting
http://livecodeconsulting.com/

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: sorting lines by date

2020-07-10 Thread JB via use-livecode
Another idea might be to save it as seconds and
then convert it to a date when the user needs to
see the date.  That way you would save the time
converting all the dates in each sort.

JB


> On Jul 10, 2020, at 9:02 PM, Tom Glod via use-livecode 
>  wrote:
> 
> Yeah it will add some overhead, but it will work to do what you need. I'm
> sorry I'm not fluent in the syntax of sort . but I knew you can specify
> a date  I never needed to use it I always store the seconds or
> milliseconds.
> 
> Yup.Might as well convert to seconds and then sort numeric ascending or
> descending. Its very fast in my experience.
> 
> All the best.
> 
> Tom
> 
> On Fri, Jul 10, 2020 at 7:55 PM JB via use-livecode <
> use-livecode@lists.runrev.com> wrote:
> 
>> If you are having problems with the date itself not being
>> sorted properly you might be able to accomplish it by
>> first converting the date to seconds and then sort the
>> data.  It will take more time but might work.
>> 
>> JB
>> 
>> 
>>> On Jul 10, 2020, at 3:06 PM, David V Glasgow via use-livecode <
>> use-livecode@lists.runrev.com> wrote:
>>> 
>>> Livecodeistas,
>>> 
>>> I am working with text files consisting of many thousands of lines, most
>> of which are in the format URL & Tab & Date - but a few don’t have a date.
>>> 
>>> So they look like this ...
>>> 
>>> http://1.lw6.blah/b7f3bd9e6b4d728a0f6d5883ed3a5ce/5326d47f?ss=152
>> 17/03/2014 9:55
>>> 
>> http://1.lw6.zdomain/storage/1/x/xk/xkwEp/encoded.mp4/7aecf5e57e34c5f9212f30d0ca16da5a/5326d454?ss=107
>> 
>>> 
>> http://1.lw6.zdomain/storage/1/x/xk/xkwEp/encoded.mp4/7aecf5e57e34c5f9212f30d0ca16da5a/5326d454?ss=107
>> 
>>> 
>> http://1.lw6.zdomain/storage/1/x/xk/xkwEp/encoded.mp4/7aecf5e57e34c5f9212f30d0ca16da5a/5326d454?ss=107
>> 
>>> http://adomain/   27/06/2016 8:10
>>> http://adomain/   27/06/2016 8:10
>>> http://adomain/   27/06/2016 8:10
>>> http://adomain/   27/06/2016 8:10
>>> 
>> http://adomain/?go=click=133=1=0=3=3841375=http%253A%252F%252Fadomain%somestuff-330835.html
>> 17/11/2013 22:18
>>> 
>> http://adomain/?go=click=133=1=0=3=3841375=http%253A%252F%252Fadomain%somestuff-330835.html
>> 17/11/2013 22:18
>>> 
>> http://adomain/?go=click=133=1=0=3=3841375=http%253A%252F%252Fadomain%somestuff-330835.html
>> 17/11/2013 22:18
>>> 
>> http://adomain/?go=click=133=1=0=3=3841375=http%253A%252F%252Fadomain%somestuff-330835.html
>> 17/11/2013 22:18
>>> 
>> http://adomain/?go=click=133=1=0=3=3841375=http%253A%252F%252Fadomain%somestuff-330835.html
>> 17/11/2013 22:18
>>> 
>>> I assumed I could sort the lines by date using the following:
>>> 
>>> set itemdel to tab
>>> sort lines of field "import" datetime by the last item of each
>>> 
>>> (I know I could speed this up using a variable, but I wanted to just see
>> the result first.)
>>> 
>>> I wasn’t sure what would happen to the lines with no date, but assumed
>> they would pile up at the beginning or the end of the field (which would be
>> fine).  However, what happens is that the script runs, and the order above
>> is generated.  I can’t see any meaningful ordering of the lines.
>>> 
>>> I have a horrible feeling that dates are more complicated than I
>> imagined, although I am sort of hoping  there something simple I just
>> haven’t grasped.  If so, what?
>>> 
>>> Best wishes,
>>> 
>>> David Glasgow
>>> ___
>>> use-livecode mailing list
>>> use-livecode@lists.runrev.com
>>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>> 
>> 
>> ___
>> use-livecode mailing list
>> use-livecode@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>> 
> 
> 
> -- 
> Tom Glod
> Founder & Developer
> MakeShyft R.D.A (www.makeshyft.com)
> Mobile:647.562.9411
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: sorting lines by date

2020-07-10 Thread Tom Glod via use-livecode
Yeah it will add some overhead, but it will work to do what you need. I'm
sorry I'm not fluent in the syntax of sort . but I knew you can specify
a date  I never needed to use it I always store the seconds or
milliseconds.

Yup.Might as well convert to seconds and then sort numeric ascending or
descending. Its very fast in my experience.

All the best.

Tom

On Fri, Jul 10, 2020 at 7:55 PM JB via use-livecode <
use-livecode@lists.runrev.com> wrote:

> If you are having problems with the date itself not being
> sorted properly you might be able to accomplish it by
> first converting the date to seconds and then sort the
> data.  It will take more time but might work.
>
> JB
>
>
> > On Jul 10, 2020, at 3:06 PM, David V Glasgow via use-livecode <
> use-livecode@lists.runrev.com> wrote:
> >
> > Livecodeistas,
> >
> > I am working with text files consisting of many thousands of lines, most
> of which are in the format URL & Tab & Date - but a few don’t have a date.
> >
> > So they look like this ...
> >
> > http://1.lw6.blah/b7f3bd9e6b4d728a0f6d5883ed3a5ce/5326d47f?ss=152
>  17/03/2014 9:55
> >
> http://1.lw6.zdomain/storage/1/x/xk/xkwEp/encoded.mp4/7aecf5e57e34c5f9212f30d0ca16da5a/5326d454?ss=107
>
> >
> http://1.lw6.zdomain/storage/1/x/xk/xkwEp/encoded.mp4/7aecf5e57e34c5f9212f30d0ca16da5a/5326d454?ss=107
>
> >
> http://1.lw6.zdomain/storage/1/x/xk/xkwEp/encoded.mp4/7aecf5e57e34c5f9212f30d0ca16da5a/5326d454?ss=107
>
> > http://adomain/   27/06/2016 8:10
> > http://adomain/   27/06/2016 8:10
> > http://adomain/   27/06/2016 8:10
> > http://adomain/   27/06/2016 8:10
> >
> http://adomain/?go=click=133=1=0=3=3841375=http%253A%252F%252Fadomain%somestuff-330835.html
>  17/11/2013 22:18
> >
> http://adomain/?go=click=133=1=0=3=3841375=http%253A%252F%252Fadomain%somestuff-330835.html
>  17/11/2013 22:18
> >
> http://adomain/?go=click=133=1=0=3=3841375=http%253A%252F%252Fadomain%somestuff-330835.html
>  17/11/2013 22:18
> >
> http://adomain/?go=click=133=1=0=3=3841375=http%253A%252F%252Fadomain%somestuff-330835.html
>  17/11/2013 22:18
> >
> http://adomain/?go=click=133=1=0=3=3841375=http%253A%252F%252Fadomain%somestuff-330835.html
>  17/11/2013 22:18
> >
> > I assumed I could sort the lines by date using the following:
> >
> > set itemdel to tab
> > sort lines of field "import" datetime by the last item of each
> >
> > (I know I could speed this up using a variable, but I wanted to just see
> the result first.)
> >
> > I wasn’t sure what would happen to the lines with no date, but assumed
> they would pile up at the beginning or the end of the field (which would be
> fine).  However, what happens is that the script runs, and the order above
> is generated.  I can’t see any meaningful ordering of the lines.
> >
> > I have a horrible feeling that dates are more complicated than I
> imagined, although I am sort of hoping  there something simple I just
> haven’t grasped.  If so, what?
> >
> > Best wishes,
> >
> > David Glasgow
> > ___
> > use-livecode mailing list
> > use-livecode@lists.runrev.com
> > Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> > http://lists.runrev.com/mailman/listinfo/use-livecode
>
>
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>


-- 
Tom Glod
Founder & Developer
MakeShyft R.D.A (www.makeshyft.com)
Mobile:647.562.9411
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: sorting lines by date

2020-07-10 Thread JB via use-livecode
If you are having problems with the date itself not being
sorted properly you might be able to accomplish it by
first converting the date to seconds and then sort the
data.  It will take more time but might work.

JB


> On Jul 10, 2020, at 3:06 PM, David V Glasgow via use-livecode 
>  wrote:
> 
> Livecodeistas,
> 
> I am working with text files consisting of many thousands of lines, most of 
> which are in the format URL & Tab & Date - but a few don’t have a date.
> 
> So they look like this ...
> 
> http://1.lw6.blah/b7f3bd9e6b4d728a0f6d5883ed3a5ce/5326d47f?ss=152 
> 17/03/2014 9:55
> http://1.lw6.zdomain/storage/1/x/xk/xkwEp/encoded.mp4/7aecf5e57e34c5f9212f30d0ca16da5a/5326d454?ss=107
> 
> http://1.lw6.zdomain/storage/1/x/xk/xkwEp/encoded.mp4/7aecf5e57e34c5f9212f30d0ca16da5a/5326d454?ss=107
> 
> http://1.lw6.zdomain/storage/1/x/xk/xkwEp/encoded.mp4/7aecf5e57e34c5f9212f30d0ca16da5a/5326d454?ss=107
> 
> http://adomain/   27/06/2016 8:10
> http://adomain/   27/06/2016 8:10
> http://adomain/   27/06/2016 8:10
> http://adomain/   27/06/2016 8:10
> http://adomain/?go=click=133=1=0=3=3841375=http%253A%252F%252Fadomain%somestuff-330835.html
>17/11/2013 22:18
> http://adomain/?go=click=133=1=0=3=3841375=http%253A%252F%252Fadomain%somestuff-330835.html
>17/11/2013 22:18
> http://adomain/?go=click=133=1=0=3=3841375=http%253A%252F%252Fadomain%somestuff-330835.html
>17/11/2013 22:18
> http://adomain/?go=click=133=1=0=3=3841375=http%253A%252F%252Fadomain%somestuff-330835.html
>17/11/2013 22:18
> http://adomain/?go=click=133=1=0=3=3841375=http%253A%252F%252Fadomain%somestuff-330835.html
>17/11/2013 22:18
> 
> I assumed I could sort the lines by date using the following:
> 
> set itemdel to tab
> sort lines of field "import" datetime by the last item of each
> 
> (I know I could speed this up using a variable, but I wanted to just see the 
> result first.)
> 
> I wasn’t sure what would happen to the lines with no date, but assumed they 
> would pile up at the beginning or the end of the field (which would be fine). 
>  However, what happens is that the script runs, and the order above is 
> generated.  I can’t see any meaningful ordering of the lines.
> 
> I have a horrible feeling that dates are more complicated than I imagined, 
> although I am sort of hoping  there something simple I just haven’t grasped.  
> If so, what?
> 
> Best wishes,
> 
> David Glasgow
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: sorting lines by date

2020-07-10 Thread David V Glasgow via use-livecode
Hi Tom,

That’s what I thought I was doing.  From the dictionary…

The dateTime keyword recognizes all LiveCode's date and time formats and sorts 
them in time order, rather than alphabetical or numeric order. 

Cheers,

David G

> On 10 Jul 2020, at 11:24 pm, Tom Glod via use-livecode 
>  wrote:
> 
> Hi David, you should be able to do this by specifying the sort-type. look
> up 'sort container' in the dictionary.

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: sorting lines by date

2020-07-10 Thread Tom Glod via use-livecode
Hi David, you should be able to do this by specifying the sort-type. look
up 'sort container' in the dictionary.

On Fri, Jul 10, 2020 at 6:07 PM David V Glasgow via use-livecode <
use-livecode@lists.runrev.com> wrote:

> Livecodeistas,
>
> I am working with text files consisting of many thousands of lines, most
> of which are in the format URL & Tab & Date - but a few don’t have a date.
>
> So they look like this ...
>
> http://1.lw6.blah/b7f3bd9e6b4d728a0f6d5883ed3a5ce/5326d47f?ss=152
>  17/03/2014 9:55
>
> http://1.lw6.zdomain/storage/1/x/xk/xkwEp/encoded.mp4/7aecf5e57e34c5f9212f30d0ca16da5a/5326d454?ss=107
>
>
> http://1.lw6.zdomain/storage/1/x/xk/xkwEp/encoded.mp4/7aecf5e57e34c5f9212f30d0ca16da5a/5326d454?ss=107
>
>
> http://1.lw6.zdomain/storage/1/x/xk/xkwEp/encoded.mp4/7aecf5e57e34c5f9212f30d0ca16da5a/5326d454?ss=107
>
> http://adomain/ 27/06/2016 8:10
> http://adomain/ 27/06/2016 8:10
> http://adomain/ 27/06/2016 8:10
> http://adomain/ 27/06/2016 8:10
>
> http://adomain/?go=click=133=1=0=3=3841375=http%253A%252F%252Fadomain%somestuff-330835.html
> 17/11/2013 22:18
>
> http://adomain/?go=click=133=1=0=3=3841375=http%253A%252F%252Fadomain%somestuff-330835.html
> 17/11/2013 22:18
>
> http://adomain/?go=click=133=1=0=3=3841375=http%253A%252F%252Fadomain%somestuff-330835.html
> 17/11/2013 22:18
>
> http://adomain/?go=click=133=1=0=3=3841375=http%253A%252F%252Fadomain%somestuff-330835.html
> 17/11/2013 22:18
>
> http://adomain/?go=click=133=1=0=3=3841375=http%253A%252F%252Fadomain%somestuff-330835.html
> 17/11/2013 22:18
>
> I assumed I could sort the lines by date using the following:
>
> set itemdel to tab
> sort lines of field "import" datetime by the last item of each
>
> (I know I could speed this up using a variable, but I wanted to just see
> the result first.)
>
> I wasn’t sure what would happen to the lines with no date, but assumed
> they would pile up at the beginning or the end of the field (which would be
> fine).  However, what happens is that the script runs, and the order above
> is generated.  I can’t see any meaningful ordering of the lines.
>
> I have a horrible feeling that dates are more complicated than I imagined,
> although I am sort of hoping  there something simple I just haven’t
> grasped.  If so, what?
>
> Best wishes,
>
> David Glasgow
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>


-- 
Tom Glod
Founder & Developer
MakeShyft R.D.A (www.makeshyft.com)
Mobile:647.562.9411
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


sorting lines by date

2020-07-10 Thread David V Glasgow via use-livecode
Livecodeistas,

I am working with text files consisting of many thousands of lines, most of 
which are in the format URL & Tab & Date - but a few don’t have a date.

So they look like this ...

http://1.lw6.blah/b7f3bd9e6b4d728a0f6d5883ed3a5ce/5326d47f?ss=152   
17/03/2014 9:55
http://1.lw6.zdomain/storage/1/x/xk/xkwEp/encoded.mp4/7aecf5e57e34c5f9212f30d0ca16da5a/5326d454?ss=107
  
http://1.lw6.zdomain/storage/1/x/xk/xkwEp/encoded.mp4/7aecf5e57e34c5f9212f30d0ca16da5a/5326d454?ss=107
  
http://1.lw6.zdomain/storage/1/x/xk/xkwEp/encoded.mp4/7aecf5e57e34c5f9212f30d0ca16da5a/5326d454?ss=107
  
http://adomain/ 27/06/2016 8:10
http://adomain/ 27/06/2016 8:10
http://adomain/ 27/06/2016 8:10
http://adomain/ 27/06/2016 8:10
http://adomain/?go=click=133=1=0=3=3841375=http%253A%252F%252Fadomain%somestuff-330835.html
 17/11/2013 22:18
http://adomain/?go=click=133=1=0=3=3841375=http%253A%252F%252Fadomain%somestuff-330835.html
 17/11/2013 22:18
http://adomain/?go=click=133=1=0=3=3841375=http%253A%252F%252Fadomain%somestuff-330835.html
 17/11/2013 22:18
http://adomain/?go=click=133=1=0=3=3841375=http%253A%252F%252Fadomain%somestuff-330835.html
 17/11/2013 22:18
http://adomain/?go=click=133=1=0=3=3841375=http%253A%252F%252Fadomain%somestuff-330835.html
 17/11/2013 22:18

I assumed I could sort the lines by date using the following:

set itemdel to tab
sort lines of field "import" datetime by the last item of each

(I know I could speed this up using a variable, but I wanted to just see the 
result first.)

I wasn’t sure what would happen to the lines with no date, but assumed they 
would pile up at the beginning or the end of the field (which would be fine).  
However, what happens is that the script runs, and the order above is 
generated.  I can’t see any meaningful ordering of the lines.

I have a horrible feeling that dates are more complicated than I imagined, 
although I am sort of hoping  there something simple I just haven’t grasped.  
If so, what?

Best wishes,

David Glasgow
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: system date

2020-05-04 Thread matthias rebbe via use-livecode
Good to know that it´s working now.


-
Matthias Rebbe
Life Is Too Short For Boring Code

> Am 04.05.2020 um 21:36 schrieb Jacques Hausser via use-livecode 
> :
> 
> OK, I restarted the computer and now everything is OK. I probably 
> inadvertently did put a little gravel somewhere in the gears… thank you 
> Martin and Matthias and sorry for the inconvenience.
> 
> 
>> Le 4 mai 2020 à 20:55, Martin Koob via use-livecode 
>>  a écrit :
>> 
>> OK I opened the 'Language and Region' settings panel and clicked on the 
>> ‘Advanced’ button and then clicked on the Tab for ‘Dates’
>> 
>> There is a field with a setting for “Short”  which was 2020-01-05.  I 
>> replaced the hyphens with slashes.
>> 
>> I had to quit and relaunch LiveCode for the change to take effect.  After I 
>> had done that the command 'put the system date’ returns '2020/05/04’
>> 
>> If I click 'Restore Defaults' in the ‘Dates' tab of the advanced 'Language 
>> and Region' settings panel my short date format goes back to 2020-05-04.
>> 
>> Martin
>> 
>> 
>> 
>> 
>>> On May 4, 2020, at 2:43 PM, Martin Koob via use-livecode 
>>>  wrote:
>>> 
>>> Huh,  I get 2020-05-04 here in Canada.  Not sure what my region settings 
>>> are.
>>> 
>>> 
>>> Regards,
>>> 
>>> Martin Koob
>>> 
>>> 
>>> 
>>> 
>>> 
>>>> On May 4, 2020, at 2:39 PM, Jacques Hausser via use-livecode 
>>>>  wrote:
>>>> 
>>>> My region settings are by default. But I would not be surprised if the 
>>>> problem comes from Apple.
>>>> 
>>>>> Le 4 mai 2020 à 20:21, matthias rebbe via use-livecode 
>>>>>  a écrit :
>>>>> 
>>>>> I tried here with DP4 on Mac OS 10.14.6.
>>>>> 
>>>>> I definitely get 04.05.20 when running your script.
>>>>> 
>>>>> Either this has to do with 10.15.4 or
>>>>> Are you sure your region settings are correct. ;)
>>>>> 
>>>>> Regards,
>>>>> 
>>>>> Matthias
>>>>> 
>>>>> 
>>>>> 
>>>>> -
>>>>> Matthias Rebbe
>>>>> Life Is Too Short For Boring Code
>>>>> 
>>>>>> Am 04.05.2020 um 20:07 schrieb Jacques Hausser via use-livecode 
>>>>>> :
>>>>>> 
>>>>>> Hello everybody,
>>>>>> 
>>>>>> Back to LC after a long time out. I’m using LC 9.6.0(dp 4) on Mac OS 
>>>>>> 10.15.4, and I just discovered that Livecode seems totally deaf to the 
>>>>>> words “system date”. EG:
>>>>>> 
>>>>>> put the date into today
>>>>>> convert today to system date
>>>>>> put today into fld 1
>>>>>> 
>>>>>> returns 5/4/20 instead of 04.05.20
>>>>>> 
>>>>>> Is "system date" deprecated? 
>>>>>> ___
>>>>>> use-livecode mailing list
>>>>>> use-livecode@lists.runrev.com
>>>>>> Please visit this url to subscribe, unsubscribe and manage your 
>>>>>> subscription preferences:
>>>>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>>>> 
>>>>> 
>>>>> ___
>>>>> use-livecode mailing list
>>>>> use-livecode@lists.runrev.com
>>>>> Please visit this url to subscribe, unsubscribe and manage your 
>>>>> subscription preferences:
>>>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>>> 
>>>> ___
>>>> use-livecode mailing list
>>>> use-livecode@lists.runrev.com
>>>> Please visit this url to subscribe, unsubscribe and manage your 
>>>> subscription preferences:
>>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>> 
>>> ___
>>> use-livecode mailing list
>>> use-livecode@lists.runrev.com
>>> Please visit this url to subscribe, unsubscribe and manage your 
>>> subscription preferences:
>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>> 
>> ___
>> use-livecode mailing list
>> use-livecode@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription 
>> preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: system date

2020-05-04 Thread Jacques Hausser via use-livecode
OK, I restarted the computer and now everything is OK. I probably inadvertently 
did put a little gravel somewhere in the gears… thank you Martin and Matthias 
and sorry for the inconvenience.


> Le 4 mai 2020 à 20:55, Martin Koob via use-livecode 
>  a écrit :
> 
> OK I opened the 'Language and Region' settings panel and clicked on the 
> ‘Advanced’ button and then clicked on the Tab for ‘Dates’
> 
> There is a field with a setting for “Short”  which was 2020-01-05.  I 
> replaced the hyphens with slashes.
> 
> I had to quit and relaunch LiveCode for the change to take effect.  After I 
> had done that the command 'put the system date’ returns '2020/05/04’
> 
> If I click 'Restore Defaults' in the ‘Dates' tab of the advanced 'Language 
> and Region' settings panel my short date format goes back to 2020-05-04.
> 
> Martin
> 
> 
> 
> 
>> On May 4, 2020, at 2:43 PM, Martin Koob via use-livecode 
>>  wrote:
>> 
>> Huh,  I get 2020-05-04 here in Canada.  Not sure what my region settings are.
>> 
>> 
>> Regards,
>> 
>> Martin Koob
>> 
>> 
>> 
>> 
>> 
>>> On May 4, 2020, at 2:39 PM, Jacques Hausser via use-livecode 
>>>  wrote:
>>> 
>>> My region settings are by default. But I would not be surprised if the 
>>> problem comes from Apple.
>>> 
>>>> Le 4 mai 2020 à 20:21, matthias rebbe via use-livecode 
>>>>  a écrit :
>>>> 
>>>> I tried here with DP4 on Mac OS 10.14.6.
>>>> 
>>>> I definitely get 04.05.20 when running your script.
>>>> 
>>>> Either this has to do with 10.15.4 or
>>>> Are you sure your region settings are correct. ;)
>>>> 
>>>> Regards,
>>>> 
>>>> Matthias
>>>> 
>>>> 
>>>> 
>>>> -
>>>> Matthias Rebbe
>>>> Life Is Too Short For Boring Code
>>>> 
>>>>> Am 04.05.2020 um 20:07 schrieb Jacques Hausser via use-livecode 
>>>>> :
>>>>> 
>>>>> Hello everybody,
>>>>> 
>>>>> Back to LC after a long time out. I’m using LC 9.6.0(dp 4) on Mac OS 
>>>>> 10.15.4, and I just discovered that Livecode seems totally deaf to the 
>>>>> words “system date”. EG:
>>>>> 
>>>>> put the date into today
>>>>> convert today to system date
>>>>> put today into fld 1
>>>>> 
>>>>> returns 5/4/20 instead of 04.05.20
>>>>> 
>>>>> Is "system date" deprecated? 
>>>>> ___
>>>>> use-livecode mailing list
>>>>> use-livecode@lists.runrev.com
>>>>> Please visit this url to subscribe, unsubscribe and manage your 
>>>>> subscription preferences:
>>>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>>> 
>>>> 
>>>> ___
>>>> use-livecode mailing list
>>>> use-livecode@lists.runrev.com
>>>> Please visit this url to subscribe, unsubscribe and manage your 
>>>> subscription preferences:
>>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>> 
>>> ___
>>> use-livecode mailing list
>>> use-livecode@lists.runrev.com
>>> Please visit this url to subscribe, unsubscribe and manage your 
>>> subscription preferences:
>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>> 
>> ___
>> use-livecode mailing list
>> use-livecode@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription 
>> preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: system date

2020-05-04 Thread Martin Koob via use-livecode
OK I opened the 'Language and Region' settings panel and clicked on the 
‘Advanced’ button and then clicked on the Tab for ‘Dates’

There is a field with a setting for “Short”  which was 2020-01-05.  I replaced 
the hyphens with slashes.

I had to quit and relaunch LiveCode for the change to take effect.  After I had 
done that the command 'put the system date’ returns '2020/05/04’

If I click 'Restore Defaults' in the ‘Dates' tab of the advanced 'Language and 
Region' settings panel my short date format goes back to 2020-05-04.

Martin




> On May 4, 2020, at 2:43 PM, Martin Koob via use-livecode 
>  wrote:
> 
> Huh,  I get 2020-05-04 here in Canada.  Not sure what my region settings are.
> 
> 
> Regards,
> 
> Martin Koob
> 
> 
> 
> 
> 
>> On May 4, 2020, at 2:39 PM, Jacques Hausser via use-livecode 
>>  wrote:
>> 
>> My region settings are by default. But I would not be surprised if the 
>> problem comes from Apple.
>> 
>>> Le 4 mai 2020 à 20:21, matthias rebbe via use-livecode 
>>>  a écrit :
>>> 
>>> I tried here with DP4 on Mac OS 10.14.6.
>>> 
>>> I definitely get 04.05.20 when running your script.
>>> 
>>> Either this has to do with 10.15.4 or
>>> Are you sure your region settings are correct. ;)
>>> 
>>> Regards,
>>> 
>>> Matthias
>>> 
>>> 
>>> 
>>> -
>>> Matthias Rebbe
>>> Life Is Too Short For Boring Code
>>> 
>>>> Am 04.05.2020 um 20:07 schrieb Jacques Hausser via use-livecode 
>>>> :
>>>> 
>>>> Hello everybody,
>>>> 
>>>> Back to LC after a long time out. I’m using LC 9.6.0(dp 4) on Mac OS 
>>>> 10.15.4, and I just discovered that Livecode seems totally deaf to the 
>>>> words “system date”. EG:
>>>> 
>>>> put the date into today
>>>> convert today to system date
>>>> put today into fld 1
>>>> 
>>>> returns 5/4/20 instead of 04.05.20
>>>> 
>>>> Is "system date" deprecated? 
>>>> ___
>>>> use-livecode mailing list
>>>> use-livecode@lists.runrev.com
>>>> Please visit this url to subscribe, unsubscribe and manage your 
>>>> subscription preferences:
>>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>> 
>>> 
>>> ___
>>> use-livecode mailing list
>>> use-livecode@lists.runrev.com
>>> Please visit this url to subscribe, unsubscribe and manage your 
>>> subscription preferences:
>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>> 
>> ___
>> use-livecode mailing list
>> use-livecode@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription 
>> preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: system date

2020-05-04 Thread Martin Koob via use-livecode
Huh,  I get 2020-05-04 here in Canada.  Not sure what my region settings are.


Regards,

Martin Koob





> On May 4, 2020, at 2:39 PM, Jacques Hausser via use-livecode 
>  wrote:
> 
> My region settings are by default. But I would not be surprised if the 
> problem comes from Apple.
> 
>> Le 4 mai 2020 à 20:21, matthias rebbe via use-livecode 
>>  a écrit :
>> 
>> I tried here with DP4 on Mac OS 10.14.6.
>> 
>> I definitely get 04.05.20 when running your script.
>> 
>> Either this has to do with 10.15.4 or
>> Are you sure your region settings are correct. ;)
>> 
>> Regards,
>> 
>> Matthias
>> 
>> 
>> 
>> -
>> Matthias Rebbe
>> Life Is Too Short For Boring Code
>> 
>>> Am 04.05.2020 um 20:07 schrieb Jacques Hausser via use-livecode 
>>> :
>>> 
>>> Hello everybody,
>>> 
>>> Back to LC after a long time out. I’m using LC 9.6.0(dp 4) on Mac OS 
>>> 10.15.4, and I just discovered that Livecode seems totally deaf to the 
>>> words “system date”. EG:
>>> 
>>> put the date into today
>>> convert today to system date
>>> put today into fld 1
>>> 
>>> returns 5/4/20 instead of 04.05.20
>>> 
>>> Is "system date" deprecated? 
>>> ___
>>> use-livecode mailing list
>>> use-livecode@lists.runrev.com
>>> Please visit this url to subscribe, unsubscribe and manage your 
>>> subscription preferences:
>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>> 
>> 
>> ___
>> use-livecode mailing list
>> use-livecode@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription 
>> preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: system date

2020-05-04 Thread Jacques Hausser via use-livecode
My region settings are by default. But I would not be surprised if the problem 
comes from Apple.

> Le 4 mai 2020 à 20:21, matthias rebbe via use-livecode 
>  a écrit :
> 
> I tried here with DP4 on Mac OS 10.14.6.
> 
> I definitely get 04.05.20 when running your script.
> 
> Either this has to do with 10.15.4 or
> Are you sure your region settings are correct. ;)
> 
> Regards,
> 
> Matthias
> 
> 
> 
> -
> Matthias Rebbe
> Life Is Too Short For Boring Code
> 
>> Am 04.05.2020 um 20:07 schrieb Jacques Hausser via use-livecode 
>> :
>> 
>> Hello everybody,
>> 
>> Back to LC after a long time out. I’m using LC 9.6.0(dp 4) on Mac OS 
>> 10.15.4, and I just discovered that Livecode seems totally deaf to the words 
>> “system date”. EG:
>> 
>> put the date into today
>> convert today to system date
>> put today into fld 1
>> 
>> returns 5/4/20 instead of 04.05.20
>> 
>> Is "system date" deprecated? 
>> ___
>> use-livecode mailing list
>> use-livecode@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription 
>> preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
> 
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: system date

2020-05-04 Thread matthias rebbe via use-livecode
I tried here with DP4 on Mac OS 10.14.6.

I definitely get 04.05.20 when running your script.

Either this has to do with 10.15.4 or
Are you sure your region settings are correct. ;)

Regards,

Matthias



-
Matthias Rebbe
Life Is Too Short For Boring Code

> Am 04.05.2020 um 20:07 schrieb Jacques Hausser via use-livecode 
> :
> 
> Hello everybody,
> 
> Back to LC after a long time out. I’m using LC 9.6.0(dp 4) on Mac OS 10.15.4, 
> and I just discovered that Livecode seems totally deaf to the words “system 
> date”. EG:
> 
> put the date into today
> convert today to system date
> put today into fld 1
> 
> returns 5/4/20 instead of 04.05.20
> 
> Is "system date" deprecated? 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


system date

2020-05-04 Thread Jacques Hausser via use-livecode
Hello everybody,

Back to LC after a long time out. I’m using LC 9.6.0(dp 4) on Mac OS 10.15.4, 
and I just discovered that Livecode seems totally deaf to the words “system 
date”. EG:

put the date into today
convert today to system date
put today into fld 1

returns 5/4/20 instead of 04.05.20

Is "system date" deprecated? 
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Date and time

2019-06-06 Thread Glen Bojsza via use-livecode
Craig,

Well done...not over done.

I hope you’re out from under your desk.

Glen

On Thu, Jun 6, 2019 at 6:18 PM dunbarxx via use-livecode <
use-livecode@lists.runrev.com> wrote:

> Feel like I am overdoing this, but a bit more compact:
>
> on mouseUp
>put "06-Jun-2019;09:05:21" into rawTime -- your formatted moment here
>
>set the itemDel to "-"
>put item 1 of rawTime into tDay
>put  itemOffset(item 2 of
> rawTime,"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec") into tMonth
>put item 3 of rawTime into temp
>set the itemDel to ";"
>put item 1 of temp into tYear
>delete item 1 of temp
>set the itemDel to ":"
>put item 1 of temp into tHour
>put item 2 of temp into tMinutes
>put item 3 of temp into tSeconds
>
>put tYear & "," & tMonth & "," & tDay & "," & tHour & "," & tMinutes &
> "," & tSeconds & "," & tDay into standardFormat
>convert standardFormat from dateItems to seconds
>answer standardFormat
> end mouseUp
>
> Brute force for sure. My favorite.
>
> Craig
>
>
>
>
> --
> Sent from:
> http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html
>
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Date and time

2019-06-06 Thread dunbarxx via use-livecode
Feel like I am overdoing this, but a bit more compact:

on mouseUp
   put "06-Jun-2019;09:05:21" into rawTime -- your formatted moment here
   
   set the itemDel to "-"
   put item 1 of rawTime into tDay
   put  itemOffset(item 2 of
rawTime,"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec") into tMonth
   put item 3 of rawTime into temp
   set the itemDel to ";"
   put item 1 of temp into tYear
   delete item 1 of temp
   set the itemDel to ":"
   put item 1 of temp into tHour
   put item 2 of temp into tMinutes
   put item 3 of temp into tSeconds
   
   put tYear & "," & tMonth & "," & tDay & "," & tHour & "," & tMinutes &
"," & tSeconds & "," & tDay into standardFormat
   convert standardFormat from dateItems to seconds
   answer standardFormat
end mouseUp

Brute force for sure. My favorite.

Craig




--
Sent from: 
http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Date and time

2019-06-06 Thread dunbarxx via use-livecode
And we should not be sloppy about using a function to display the answer,
rather to return a value and let the calling handler do that. But I was
avoiding actually working when I snuck this in, so I was typing from under
my desk.

Craig



--
Sent from: 
http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Date and time

2019-06-06 Thread dunbarxx via use-livecode
OF course you would need a little better than the last, so the DOW is not
just entered by me for testing:

on mouseUp
   put "06-Jun-2019;09:05:21" into rawTime
   put dissectRawTime(rawTime)  into tSeconds
   convert rawTime to seconds
end mouseUp

function dissectRawTime rawtime
   get the long date ; convert it to dateItems
   
   set the itemDel to "-"
   put item 1 of rawTime into tDay
   put getMonth(item 2 of rawTime) into tMonth
   put item 3 of rawTime into temp
   set the itemDel to ";"
   put item 1 of temp into tYear
   delete item 1 of temp
   set the itemDel to ":"
   put item 1 of temp into tHour
   put item 2 of temp into tMinutes
   put item 3 of temp into tSeconds
   
   put tYear & "," & tMonth & "," & tDay & "," & tHour & "," & tMinutes &
"," & tSeconds & "," & tDay into standardFormat
   convert standardFormat from dateItems to seconds
   answer standardFormat
end dissectRawTime

function getMonth tMonth
   return
itemOffset(tMonth,"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec")
end getMonth



--
Sent from: 
http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Date and time

2019-06-06 Thread dunbarxx via use-livecode
Try this in a button script somewhere"

on mouseUp
   put "06-Jun-2019;09:05:21" into rawTime
   put dissectRawTime(rawTime)  into tSeconds
   convert rawTime to seconds
end mouseUp

function dissectRawTime rawtime
   get the long date ; convert it to dateItems
   
   set the itemDel to "-"
   put item 1 of rawTime into tDay
   put getMonth(item 2 of rawTime) into tMonth
   put item 3 of rawTime into temp
   set the itemDel to ";"
   put item 1 of temp into tYear
   delete item 1 of temp
   set the itemDel to ":"
   put item 1 of temp into tHour
   put item 2 of temp into tMinutes
   put item 3 of temp into tSeconds
   
   put tYear & "," & tMonth & "," & tDay & "," & tHour & "," & tMinutes &
"," & tSeconds & "," & "5" into standardFormat
   convert standardFormat from dateItems to seconds
end dissectRawTime

function getMonth tMonth
   return
itemOffset(tMonth,"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec")
end getMonth



--
Sent from: 
http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Date and time

2019-06-06 Thread Glen Bojsza via use-livecode
Obviously I overthought this (thanks Bob)...I was trying to convert the
time separately and then the date and combining them which was leading to
issues.

The dictionary format example doesn't show this as being a solution...

Glen

On Thu, Jun 6, 2019 at 2:54 PM Bob Sneidar via use-livecode <
use-livecode@lists.runrev.com> wrote:

> First of all that date cannot be converted in that format. Secondly, try
> convert "Jun 6 2019 09:05:21" to seconds
>
>
>
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Date and time

2019-06-06 Thread Bob Sneidar via use-livecode
First of all that date cannot be converted in that format. Secondly, try 
convert "Jun 6 2019 09:05:21" to seconds

Bob S


> On Jun 6, 2019, at 11:40 , Glen Bojsza via use-livecode 
>  wrote:
> 
> I'm pondering the easiest way to do a linear scale based on date and time
> data.
> 
> My thoughts are that if you can change 06-Jun-2019;09:05:21 to epoch
> seconds then it would possible to take all the similar timestamped data and
> change it to seconds thus using it as an "x-axis" scale for graphing
> purposes.
> 
> Of course after the scale is done and the determination of the number of
> ticks used (i think it would be between 5 and 10 ) then you could reverse
> the tick marks labels from seconds back to time.
> 
> I guess my difficulty is is getting 06-Jun-2019;09:05:21 converted to
> seconds. I have gone through several of the dictionary details around
> converting but have not found a solution...
> 
> Any suggestions?
> 
> thanks,
> 
> Glen


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Date and time

2019-06-06 Thread dunbarxx via use-livecode
Hi.

Write a simple function that dissects the string you gave. (Pseudo)

function dissectOddFormat
  use itemDelimeters to isolate "06", "Jun", "2019", "09", "05" and "21"
  reform these strings into the date/time format local to your part of the
planet
  convert that new string to seconds or ticks


Craig



--
Sent from: 
http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Date and time

2019-06-06 Thread Glen Bojsza via use-livecode
I'm pondering the easiest way to do a linear scale based on date and time
data.

My thoughts are that if you can change 06-Jun-2019;09:05:21 to epoch
seconds then it would possible to take all the similar timestamped data and
change it to seconds thus using it as an "x-axis" scale for graphing
purposes.

Of course after the scale is done and the determination of the number of
ticks used (i think it would be between 5 and 10 ) then you could reverse
the tick marks labels from seconds back to time.

I guess my difficulty is is getting 06-Jun-2019;09:05:21 converted to
seconds. I have gone through several of the dictionary details around
converting but have not found a solution...

Any suggestions?

thanks,

Glen
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: setting file created date in livecode from script

2019-04-15 Thread Stephen Barncard via use-livecode
Thank you James, Richard, Alex, and Bob for your replies.

As it turns out, James' suggestion was a good one and version 6 of "A
Better Finder Rename" does indeed to appear to do what I want.
In connection with Public Space's  companion
folder utility, I can do it all without writing a line of code.

It would have been a nice exercise in Livecode programming but  I need to
use my time towards the other things I need to do...
Comparing what I charge for my time VS the hours the Public Space person
put into his code the fees are miniscule..

sqb
--
Stephen Barncard - Sebastopol Ca. USA -
mixstream.org


On Mon, Apr 15, 2019 at 3:14 AM James At The Hale via use-livecode <
use-livecode@lists.runrev.com> wrote:

> If you are looking for an existing app the folks at publicspace have what
> I think you need
> http://www.publicspace.net/ABetterFinderAttributes/index.html
>
> Although I haven’t had a need for this particular app I have used a
> companion app (A BetterFinder Renamer) for years and it has worked
> flawlessly saving me hours of time.
>
> James
>
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: setting file created date in livecode from script

2019-04-15 Thread Richard Gaskin via use-livecode

Bob Sneidar wrote:

> And as always my disclaimer for NextCloud: Once you begin syncing your
> local files to a NextCloud server, the server BECOMES THE MASTER!
> Unsyncing a particular subfolder in the future has the particularly
> henious effect of DELETING YOUR LOCAL FOLDER! Turning sync back on for
> that folder will restore it (assuming you have not burned the
> NextCloud device in a holy ritual as the invention of hellish forces
> beyond your control, before doing so.)

Recent versions provide more explicit guidance on that:
https://help.nextcloud.com/t/unchecked-folders-will-be-removed-from-your-file-system/12335/9

While it's true with Nextcloud, it's really a generic challenge any 
folder sync program will face if they provide folder-level control over 
what gets synced.  The discussion linked to above explores that in detail.


Some folder sharing services shrug their shoulders on this by just not 
allowing you any control over sub-folders at all. You're required to 
share one folder, and everything within it is always synced, and you 
can't choose to do anything else -- no one can be confused by a feature 
that doesn't exist. :)


Nextcloud is among the few offering fine-grained control over which 
folders get synced and which ones don't.


But as with the rest of life, with great power comes great 
responsibility.  Helpful to read the manual on things involving deletes 
before committing.  And for busy people recent versions provide guidance 
on that when the checkbox is unchecked, so you don't even need to RTFM.


And with any backup metyhods -- Nextcloud, commercial cloud services, 
Time Machine, local rsync to a portable drive, any of them -- never rely 
on just one.  Each has its own strengths and weaknesses, and ideally you 
want your data not only redundantly backed up, but backed up using 
systems of different *types*.


--
 Richard Gaskin
 Fourth World Systems
 Software Design and Development for the Desktop, Mobile, and the Web
 
 ambassa...@fourthworld.comhttp://www.FourthWorld.com

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: setting file created date in livecode from script

2019-04-15 Thread Bob Sneidar via use-livecode
And as always my disclaimer for NextCloud: Once you begin syncing your local 
files to a NextCloud server, the server BECOMES THE MASTER! Unsyncing a 
particular subfolder in the future has the particularly henious effect of 
DELETING YOUR LOCAL FOLDER! Turning sync back on for that folder will restore 
it (assuming you have not burned the NextCloud device in a holy ritual as the 
invention of hellish forces beyond your control, before doing so.) 

Many complaints about it, some workarounds which involve editing some config 
file or other in an SSL terminal session, which by the way is turned off by 
default and you have to go find out how to turn it on, which as I recall means 
installing some new modules or other. 

That being said, as long as you are aware of these limitations and plan which 
specific folders you want to backup beforehand, (and by the way don't have any 
large files like VM's that change regularly in any of those folders because it 
takes an inordinate of time to do so) you should be fine. 

Bob S


> On Apr 14, 2019, at 22:01 , Richard Gaskin via use-livecode 
>  wrote:
> 
> 4. You can liberate yourself:  https://nextcloud.com/
> 
> I met the project founder, Frank Karlitschek, when we had him speak at UbuCon 
> in Pasadena a few years ago.  Great guy, great team, all super passionate 
> about free and open source software, and leaving the user in control of their 
> cloud services.
> 
> More than just file sharing with one of the best sync mechanisms I've ever 
> seen, it also includes many dozens of add-on apps for everything from team 
> management to music streaming to video chat and more.


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: setting file created date in livecode from script

2019-04-15 Thread Stephen Barncard via use-livecode
Thank you James - I have licensed  all the 'Better' Apps for over 10 years
but I didn't think they were capable of
1. Reading the EXIF date
2. AND setting the Created Date and time of the file with formatted
information gained from the EXIF info
3. AND renaming the filename of that file with formatted information gained
from the EXIF info
*in one operation*

please tell me if I'm wrong - perhaps this could be done in multiple steps
with BETTERs...

I'm trying to set up my photo archive in a way that keeps all the images in
hierarchal folders of Year and month
--
Stephen Barncard - Sebastopol Ca. USA -
mixstream.org


On Mon, Apr 15, 2019 at 3:14 AM James At The Hale via use-livecode <
use-livecode@lists.runrev.com> wrote:

> If you are looking for an existing app the folks at publicspace have what
> I think you need
> http://www.publicspace.net/ABetterFinderAttributes/index.html
>
> Although I haven’t had a need for this particular app I have used a
> companion app (A BetterFinder Renamer) for years and it has worked
> flawlessly saving me hours of time.
>
> James
>
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: setting file created date in livecode from script

2019-04-15 Thread Keith Martin via use-livecode

Hi Stephen,

I made a little tool (in LiveCode, natch) for doing this using touch. 
It's here: 
http://panoramaphotographer.com/software/likeaversion/index.html and 
there's a link near the bottom of the page to download the LiveCode 
stack.


k


On 14 Apr 2019, at 22:52, Stephen Barncard via use-livecode wrote:


answering my own question: TOUCH
looks like what I want... gotta love BSD Unix...

NAME

 touch -- change file access and modification times


SYNOPSIS

 touch [-A [-][[hh]mm]SS] [-acfhm] [-r file] [-t 
[[CC]YY]MMDDhhmm[.SS]]


   file ...


DESCRIPTION

 The touch utility sets the modification and access times of 
files.  If


 any file does not exist, it is created with default permissions.


 By default, touch changes both modification and access times.  
The -a

and

 -m flags may be used to select the access time or the 
modification time


 individually.  Selecting both is equivalent to the default.  By
default,

 the timestamps are set to the current time.  The -t flag 
explicitly

spec-

 ifies a different time, and the -r flag specifies to set the 
times

those

 of the specified file.  The -A flag adjusts the values by a 
specified


 amount.
.

full definition can be had by typing MAN TOUCH




I hope others can use this knowledge..sorry to raise the alarm.


I'm off to write a handler, which I'll post later if anyone is 
interested



Now I've got to find those EXIF routines, they're around somewhere


thanks , self


this is the kind of stuff that LC is so good for...
--
Stephen Barncard - Sebastopol Ca. USA -
mixstream.org


On Sun, Apr 14, 2019 at 2:36 PM Stephen Barncard 


wrote:


Hi Gang,

I thought file date change had been a part of livecode for years, but 
I
can't find anything in the docs about setting the created or modified 
dates

in files.
I need to do this on the Mac desktop.

Why? because several years ago $@$#$@#$@'ing  dropbox, without my
permission, started changing not only filenames but DATES in a huge 
swath
of precious photos in  a particularly dishonest way -- they wanted my 
free

account to fill up quickly so I'd have to "upgrade".
I know the EXIF tags still exist inside each file, but all the file 
dates

had been changed to the date of copying.
Dropbox has been increasingly piggish lately - not allowing more than 
3

machines on the free account.
It's a mess.  This does not endear me to these greedy people.

I have to write a custom handler to deal with this - there's no app 
that

can do this - I don't think.

perhaps there's something I can call from the shell - I'd be good 
with

that.

Anyone have an idea? Thanks in advance.

sqb
--
Stephen Barncard - Sebastopol Ca. USA -
mixstream.org


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your 
subscription preferences:

http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: setting file created date in livecode from script

2019-04-15 Thread James At The Hale via use-livecode
If you are looking for an existing app the folks at publicspace have what I 
think you need
http://www.publicspace.net/ABetterFinderAttributes/index.html

Although I haven’t had a need for this particular app I have used a companion 
app (A BetterFinder Renamer) for years and it has worked flawlessly saving me 
hours of time.

James

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: setting file created date in livecode from script

2019-04-14 Thread Stephen Barncard via use-livecode
Thanks Richard, I'll check out your suggestion.
--
Stephen Barncard - Sebastopol Ca. USA -
mixstream.org


On Sun, Apr 14, 2019 at 10:18 PM Stephen Barncard 
wrote:

> the altering was the filename change - some kind of unique number,  and
> the created dates were changed as well - for no reason.
> --
> Stephen Barncard - Sebastopol Ca. USA -
> mixstream.org
>
>
> On Sun, Apr 14, 2019 at 10:15 PM Stephen Barncard 
> wrote:
>
>> "1. How does changing the date affect their space quota?"
>> The unwanted photo file uploads affected MY space quota on the free
>> account, they fill it up, and then they tell you you are near the  'limit'
>> and must buy more space.
>> When I got my files back, they were altered.  It's just dishonest and
>> disingenuous.
>>
>> of course I'm looking for something else but I'd rather not be doing time
>> consuming configuring. I have better things to do.
>> --
>> Stephen Barncard - Sebastopol Ca. USA -
>> mixstream.org
>>
>>
>> On Sun, Apr 14, 2019 at 10:02 PM Richard Gaskin via use-livecode <
>> use-livecode@lists.runrev.com> wrote:
>>
>>> Stephen Barncard wrote:
>>>
>>>  > Why? because several years ago $@$#$@#$@'ing  dropbox, without my
>>>  > permission, started changing not only filenames but DATES in a huge
>>>  > swath of precious photos in  a particularly dishonest way -- they
>>>  > wanted my free account to fill up quickly so I'd have to "upgrade".
>>>  > I know the EXIF tags still exist inside each file, but all the file
>>>  > dates had been changed to the date of copying.
>>>  > Dropbox has been increasingly piggish lately - not allowing more than
>>>  > 3 machines on the free account.
>>>  > It's a mess.  This does not endear me to these greedy people.
>>>
>>>
>>> 1. How does changing the date affect their space quota?
>>>
>>>
>>> 2. Dropbox policies have become too FUBAR for me to spend time with
>>> anymore.  For example, I have no files in my account, and recently got a
>>> notice saying I was out of disk space and needed to pay them for an
>>> upgrade.  That shouldn't be possible.  But it turns out they count files
>>> shared with you against both the account where the file originates and
>>> yours tool - even though the file exists in only one location. #doubledip
>>>
>>>
>>> 3. This means a really hack to annoy people: just put a really big file
>>> in your account and share it with anyone you don't like.  Since it'll
>>> count against their quota, you've just prevented them from being able to
>>> add anything else to their account.  #insane
>>>
>>>
>>> 4. You can liberate yourself:  https://nextcloud.com/
>>>
>>> I met the project founder, Frank Karlitschek, when we had him speak at
>>> UbuCon in Pasadena a few years ago.  Great guy, great team, all super
>>> passionate about free and open source software, and leaving the user in
>>> control of their cloud services.
>>>
>>> More than just file sharing with one of the best sync mechanisms I've
>>> ever seen, it also includes many dozens of add-on apps for everything
>>> from team management to music streaming to video chat and more.
>>>
>>> I have a dedicated Nextcloud server in my office for myself, and another
>>> on a VPS I use with clients and vendors.  With native sync clients for
>>> Mac, Windows, and Linux (and iOS, and Android too), my LiveCode Plugins
>>> folder is kept current no matter which machine I happen to be working
>>> at.  And with its convenient versioning, if I mess up and want to revert
>>> one of my plugins to yesterday's it's a breeze.
>>>
>>> Runs on any standard LAMP/WAMP/MAMP server.  And if you're using it on
>>> Ubuntu 18.04 you can install it one line using the new Snap packager.
>>>
>>> And you remain in control of everything.
>>>
>>> Nope, not in any way affiliate with Nextcloud.  Just a very happy user.
>>>
>>> --
>>>   Richard Gaskin
>>>   Fourth World Systems
>>>   Software Design and Development for the Desktop, Mobile, and the Web
>>>   
>>>   ambassa...@fourthworld.comhttp://www.FourthWorld.com
>>>
>>> ___
>>> use-livecode mailing list
>>> use-livecode@lists.runrev.com
>>> Please visit this url to subscribe, unsubscribe and manage your
>>> subscription preferences:
>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>>
>>
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: setting file created date in livecode from script

2019-04-14 Thread Stephen Barncard via use-livecode
the altering was the filename change - some kind of unique number,  and the
created dates were changed as well - for no reason.
--
Stephen Barncard - Sebastopol Ca. USA -
mixstream.org


On Sun, Apr 14, 2019 at 10:15 PM Stephen Barncard 
wrote:

> "1. How does changing the date affect their space quota?"
> The unwanted photo file uploads affected MY space quota on the free
> account, they fill it up, and then they tell you you are near the  'limit'
> and must buy more space.
> When I got my files back, they were altered.  It's just dishonest and
> disingenuous.
>
> of course I'm looking for something else but I'd rather not be doing time
> consuming configuring. I have better things to do.
> --
> Stephen Barncard - Sebastopol Ca. USA -
> mixstream.org
>
>
> On Sun, Apr 14, 2019 at 10:02 PM Richard Gaskin via use-livecode <
> use-livecode@lists.runrev.com> wrote:
>
>> Stephen Barncard wrote:
>>
>>  > Why? because several years ago $@$#$@#$@'ing  dropbox, without my
>>  > permission, started changing not only filenames but DATES in a huge
>>  > swath of precious photos in  a particularly dishonest way -- they
>>  > wanted my free account to fill up quickly so I'd have to "upgrade".
>>  > I know the EXIF tags still exist inside each file, but all the file
>>  > dates had been changed to the date of copying.
>>  > Dropbox has been increasingly piggish lately - not allowing more than
>>  > 3 machines on the free account.
>>  > It's a mess.  This does not endear me to these greedy people.
>>
>>
>> 1. How does changing the date affect their space quota?
>>
>>
>> 2. Dropbox policies have become too FUBAR for me to spend time with
>> anymore.  For example, I have no files in my account, and recently got a
>> notice saying I was out of disk space and needed to pay them for an
>> upgrade.  That shouldn't be possible.  But it turns out they count files
>> shared with you against both the account where the file originates and
>> yours tool - even though the file exists in only one location. #doubledip
>>
>>
>> 3. This means a really hack to annoy people: just put a really big file
>> in your account and share it with anyone you don't like.  Since it'll
>> count against their quota, you've just prevented them from being able to
>> add anything else to their account.  #insane
>>
>>
>> 4. You can liberate yourself:  https://nextcloud.com/
>>
>> I met the project founder, Frank Karlitschek, when we had him speak at
>> UbuCon in Pasadena a few years ago.  Great guy, great team, all super
>> passionate about free and open source software, and leaving the user in
>> control of their cloud services.
>>
>> More than just file sharing with one of the best sync mechanisms I've
>> ever seen, it also includes many dozens of add-on apps for everything
>> from team management to music streaming to video chat and more.
>>
>> I have a dedicated Nextcloud server in my office for myself, and another
>> on a VPS I use with clients and vendors.  With native sync clients for
>> Mac, Windows, and Linux (and iOS, and Android too), my LiveCode Plugins
>> folder is kept current no matter which machine I happen to be working
>> at.  And with its convenient versioning, if I mess up and want to revert
>> one of my plugins to yesterday's it's a breeze.
>>
>> Runs on any standard LAMP/WAMP/MAMP server.  And if you're using it on
>> Ubuntu 18.04 you can install it one line using the new Snap packager.
>>
>> And you remain in control of everything.
>>
>> Nope, not in any way affiliate with Nextcloud.  Just a very happy user.
>>
>> --
>>   Richard Gaskin
>>   Fourth World Systems
>>   Software Design and Development for the Desktop, Mobile, and the Web
>>   
>>   ambassa...@fourthworld.comhttp://www.FourthWorld.com
>>
>> ___
>> use-livecode mailing list
>> use-livecode@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>
>
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: setting file created date in livecode from script

2019-04-14 Thread Stephen Barncard via use-livecode
"1. How does changing the date affect their space quota?"
The unwanted photo file uploads affected MY space quota on the free
account, they fill it up, and then they tell you you are near the  'limit'
and must buy more space.
When I got my files back, they were altered.  It's just dishonest and
disingenuous.

of course I'm looking for something else but I'd rather not be doing time
consuming configuring. I have better things to do.
--
Stephen Barncard - Sebastopol Ca. USA -
mixstream.org


On Sun, Apr 14, 2019 at 10:02 PM Richard Gaskin via use-livecode <
use-livecode@lists.runrev.com> wrote:

> Stephen Barncard wrote:
>
>  > Why? because several years ago $@$#$@#$@'ing  dropbox, without my
>  > permission, started changing not only filenames but DATES in a huge
>  > swath of precious photos in  a particularly dishonest way -- they
>  > wanted my free account to fill up quickly so I'd have to "upgrade".
>  > I know the EXIF tags still exist inside each file, but all the file
>  > dates had been changed to the date of copying.
>  > Dropbox has been increasingly piggish lately - not allowing more than
>  > 3 machines on the free account.
>  > It's a mess.  This does not endear me to these greedy people.
>
>
> 1. How does changing the date affect their space quota?
>
>
> 2. Dropbox policies have become too FUBAR for me to spend time with
> anymore.  For example, I have no files in my account, and recently got a
> notice saying I was out of disk space and needed to pay them for an
> upgrade.  That shouldn't be possible.  But it turns out they count files
> shared with you against both the account where the file originates and
> yours tool - even though the file exists in only one location. #doubledip
>
>
> 3. This means a really hack to annoy people: just put a really big file
> in your account and share it with anyone you don't like.  Since it'll
> count against their quota, you've just prevented them from being able to
> add anything else to their account.  #insane
>
>
> 4. You can liberate yourself:  https://nextcloud.com/
>
> I met the project founder, Frank Karlitschek, when we had him speak at
> UbuCon in Pasadena a few years ago.  Great guy, great team, all super
> passionate about free and open source software, and leaving the user in
> control of their cloud services.
>
> More than just file sharing with one of the best sync mechanisms I've
> ever seen, it also includes many dozens of add-on apps for everything
> from team management to music streaming to video chat and more.
>
> I have a dedicated Nextcloud server in my office for myself, and another
> on a VPS I use with clients and vendors.  With native sync clients for
> Mac, Windows, and Linux (and iOS, and Android too), my LiveCode Plugins
> folder is kept current no matter which machine I happen to be working
> at.  And with its convenient versioning, if I mess up and want to revert
> one of my plugins to yesterday's it's a breeze.
>
> Runs on any standard LAMP/WAMP/MAMP server.  And if you're using it on
> Ubuntu 18.04 you can install it one line using the new Snap packager.
>
> And you remain in control of everything.
>
> Nope, not in any way affiliate with Nextcloud.  Just a very happy user.
>
> --
>   Richard Gaskin
>   Fourth World Systems
>   Software Design and Development for the Desktop, Mobile, and the Web
>   
>   ambassa...@fourthworld.comhttp://www.FourthWorld.com
>
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: setting file created date in livecode from script

2019-04-14 Thread Richard Gaskin via use-livecode

Stephen Barncard wrote:

> Why? because several years ago $@$#$@#$@'ing  dropbox, without my
> permission, started changing not only filenames but DATES in a huge
> swath of precious photos in  a particularly dishonest way -- they
> wanted my free account to fill up quickly so I'd have to "upgrade".
> I know the EXIF tags still exist inside each file, but all the file
> dates had been changed to the date of copying.
> Dropbox has been increasingly piggish lately - not allowing more than
> 3 machines on the free account.
> It's a mess.  This does not endear me to these greedy people.


1. How does changing the date affect their space quota?


2. Dropbox policies have become too FUBAR for me to spend time with 
anymore.  For example, I have no files in my account, and recently got a 
notice saying I was out of disk space and needed to pay them for an 
upgrade.  That shouldn't be possible.  But it turns out they count files 
shared with you against both the account where the file originates and 
yours tool - even though the file exists in only one location. #doubledip



3. This means a really hack to annoy people: just put a really big file 
in your account and share it with anyone you don't like.  Since it'll 
count against their quota, you've just prevented them from being able to 
add anything else to their account.  #insane



4. You can liberate yourself:  https://nextcloud.com/

I met the project founder, Frank Karlitschek, when we had him speak at 
UbuCon in Pasadena a few years ago.  Great guy, great team, all super 
passionate about free and open source software, and leaving the user in 
control of their cloud services.


More than just file sharing with one of the best sync mechanisms I've 
ever seen, it also includes many dozens of add-on apps for everything 
from team management to music streaming to video chat and more.


I have a dedicated Nextcloud server in my office for myself, and another 
on a VPS I use with clients and vendors.  With native sync clients for 
Mac, Windows, and Linux (and iOS, and Android too), my LiveCode Plugins 
folder is kept current no matter which machine I happen to be working 
at.  And with its convenient versioning, if I mess up and want to revert 
one of my plugins to yesterday's it's a breeze.


Runs on any standard LAMP/WAMP/MAMP server.  And if you're using it on 
Ubuntu 18.04 you can install it one line using the new Snap packager.


And you remain in control of everything.

Nope, not in any way affiliate with Nextcloud.  Just a very happy user.

--
 Richard Gaskin
 Fourth World Systems
 Software Design and Development for the Desktop, Mobile, and the Web
 
 ambassa...@fourthworld.comhttp://www.FourthWorld.com

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: setting file created date in livecode from script

2019-04-14 Thread Alex Tweedly via use-livecode



On 14/04/2019 22:36, Stephen Barncard via use-livecode wrote:

I have to write a custom handler to deal with this - there's no app that
can do this - I don't think.


I know you found the way to write the custom handler, using 'shell + touch'.

But if you want to just use an existing app, exiftool can do this ...

|exiftool -r '-DateTimeOriginal>FileModifyDate' directoryname|

-- Alex.


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: setting file created date in livecode from script

2019-04-14 Thread Stephen Barncard via use-livecode
answering my own question: TOUCH
looks like what I want... gotta love BSD Unix...

NAME

 touch -- change file access and modification times


SYNOPSIS

 touch [-A [-][[hh]mm]SS] [-acfhm] [-r file] [-t [[CC]YY]MMDDhhmm[.SS]]

   file ...


DESCRIPTION

 The touch utility sets the modification and access times of files.  If

 any file does not exist, it is created with default permissions.


 By default, touch changes both modification and access times.  The -a
and

 -m flags may be used to select the access time or the modification time

 individually.  Selecting both is equivalent to the default.  By
default,

 the timestamps are set to the current time.  The -t flag explicitly
spec-

 ifies a different time, and the -r flag specifies to set the times
those

 of the specified file.  The -A flag adjusts the values by a specified

 amount.
.

full definition can be had by typing MAN TOUCH




I hope others can use this knowledge..sorry to raise the alarm.


I'm off to write a handler, which I'll post later if anyone is interested


Now I've got to find those EXIF routines, they're around somewhere


thanks , self


this is the kind of stuff that LC is so good for...
--
Stephen Barncard - Sebastopol Ca. USA -
mixstream.org


On Sun, Apr 14, 2019 at 2:36 PM Stephen Barncard 
wrote:

> Hi Gang,
>
> I thought file date change had been a part of livecode for years, but I
> can't find anything in the docs about setting the created or modified dates
> in files.
> I need to do this on the Mac desktop.
>
> Why? because several years ago $@$#$@#$@'ing  dropbox, without my
> permission, started changing not only filenames but DATES in a huge swath
> of precious photos in  a particularly dishonest way -- they wanted my free
> account to fill up quickly so I'd have to "upgrade".
> I know the EXIF tags still exist inside each file, but all the file dates
> had been changed to the date of copying.
> Dropbox has been increasingly piggish lately - not allowing more than 3
> machines on the free account.
> It's a mess.  This does not endear me to these greedy people.
>
> I have to write a custom handler to deal with this - there's no app that
> can do this - I don't think.
>
> perhaps there's something I can call from the shell - I'd be good with
> that.
>
> Anyone have an idea? Thanks in advance.
>
> sqb
> --
> Stephen Barncard - Sebastopol Ca. USA -
> mixstream.org
>
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


setting file created date in livecode from script

2019-04-14 Thread Stephen Barncard via use-livecode
Hi Gang,

I thought file date change had been a part of livecode for years, but I
can't find anything in the docs about setting the created or modified dates
in files.
I need to do this on the Mac desktop.

Why? because several years ago $@$#$@#$@'ing  dropbox, without my
permission, started changing not only filenames but DATES in a huge swath
of precious photos in  a particularly dishonest way -- they wanted my free
account to fill up quickly so I'd have to "upgrade".
I know the EXIF tags still exist inside each file, but all the file dates
had been changed to the date of copying.
Dropbox has been increasingly piggish lately - not allowing more than 3
machines on the free account.
It's a mess.  This does not endear me to these greedy people.

I have to write a custom handler to deal with this - there's no app that
can do this - I don't think.

perhaps there's something I can call from the shell - I'd be good with that.

Anyone have an idea? Thanks in advance.

sqb
--
Stephen Barncard - Sebastopol Ca. USA -
mixstream.org
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Anyone using the Native Date picker widget from the Mobile Native Essentials Widget Pack?

2019-02-14 Thread Matthias Rebbe via use-livecode

Please forget my question. It seems i just misunderstood the widget.
The widget is the datePicker and i have to first resize it from its default 
size, which is usesless, to a higher height and then have to show and hide it. 

I really don´t know why i thought this is kind of a button which shows up the 
pickup upon clicking. ;)

Anyway. I´ve got it working.

But it would be nice if the default size of that widget would be changed so it 
does not have to be resized.
Maybe i should send Todd that as a feature request.

Matthias 


Matthias Rebbe

free tools for Livecoders:
https://instamaker.dermattes.de <https://instamaker.dermattes.de/>
https://winsignhelper.dermattes.de <https://winsignhelper.dermattes.de/>

> Am 14.02.2019 um 10:30 schrieb Matthias Rebbe via use-livecode 
> mailto:use-livecode@lists.runrev.com>>:
> 
> Hi,
> is anyone able to successfully use the Native Date Picker widget from the 
> Mobile Native Essentials Widget Pack?
> 
> Is there something special to get it working? I´ve selected it in the 
> inclusion tab and i can see on the iPad some "incomplete" characters at the 
> location of the widget, but nothing happens when touching the characters. The 
> happnes when trying the native Time Picker.
> 
> I am working with LC 9.0.2 and Xcode 10.0 on Mac OS X 10.13.6 and SDK12. As 
> the other widgets of the pack do work without a problem, i don´t think that 
> this has todo with the version of Xcode/SDK/LC.
> Or am i wrong?
> 
> 
> Regards,
> 
> Matthias
> 
> 
> 
> 
> Matthias Rebbe
> 
> free tools for Livecoders:
> https://instamaker.dermattes.de <https://instamaker.dermattes.de/> 
> <https://instamaker.dermattes.de/ <https://instamaker.dermattes.de/>>
> https://winsignhelper.dermattes.de <https://winsignhelper.dermattes.de/> 
> <https://winsignhelper.dermattes.de/ <https://winsignhelper.dermattes.de/>>
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com <mailto:use-livecode@lists.runrev.com>
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Anyone using the Native Date picker widget from the Mobile Native Essentials Widget Pack?

2019-02-14 Thread Matthias Rebbe via use-livecode
Hi,
is anyone able to successfully use the Native Date Picker widget from the 
Mobile Native Essentials Widget Pack?

Is there something special to get it working? I´ve selected it in the inclusion 
tab and i can see on the iPad some "incomplete" characters at the location of 
the widget, but nothing happens when touching the characters. The happnes when 
trying the native Time Picker.

I am working with LC 9.0.2 and Xcode 10.0 on Mac OS X 10.13.6 and SDK12. As the 
other widgets of the pack do work without a problem, i don´t think that this 
has todo with the version of Xcode/SDK/LC.
Or am i wrong?


Regards,

Matthias




Matthias Rebbe

free tools for Livecoders:
https://instamaker.dermattes.de <https://instamaker.dermattes.de/>
https://winsignhelper.dermattes.de <https://winsignhelper.dermattes.de/>
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

system date also works with the long system date?

2018-10-31 Thread Klaus major-k via use-livecode
Hi friends,

quick question, see subject, just to be sure.
Maybe someone can confirm this.


Problem, LC on ANDROID still does not support the system date,
so sorting by date in a datagrid does not work for non-english dates.

This just one of the inconveniences resulting from this missing feature

Who also thinks this SHOULD work on Android (4 years after the confirmed 
report), 
please consider to add comment here: 
<https://quality.livecode.com/show_bug.cgi?id=11726>


Best

Klaus

--
Klaus Major
http://www.major-k.de
kl...@major-k.de


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Internet Date Service test

2018-09-15 Thread Peter Bogdanoff via use-livecode
Thank you Mark, I’ll try it out.

Peter


> On Sep 14, 2018, at 9:24 PM, Mark Wieder via use-livecode 
>  wrote:
> 
> On 09/14/2018 08:30 PM, Peter Bogdanoff via use-livecode wrote:
> > I’m not seeing how to translate use of an NTP server into "LC-talk.” I 
> > would love to use it but Google doesn’t seem to have an API that I can 
> > access. And I would love the dependability of the Google universe.
> 
> NTP uses port 13.
> 
> constant kNTPsocket = "time.nist.gov:13"
> 
> on mouseUp pMouseButton
>   open socket to kNTPsocket with message "opened"
>   if the result is not empty then
>  put the result after msg
>   end if
> end mouseUp
> 
> on opened
>   local tTime
> 
>   read from socket kNTPsocket until EOF
>   put it into tTime
>   put tTime after msg
>   close socket kNTPSocket
> end opened
> 
> -- 
> Mark Wieder
> ahsoftw...@gmail.com
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Internet Date Service test

2018-09-14 Thread Mark Wieder via use-livecode

On 09/14/2018 08:30 PM, Peter Bogdanoff via use-livecode wrote:
> I’m not seeing how to translate use of an NTP server into "LC-talk.” 
I would love to use it but Google doesn’t seem to have an API that I can 
access. And I would love the dependability of the Google universe.


NTP uses port 13.

constant kNTPsocket = "time.nist.gov:13"

on mouseUp pMouseButton
   open socket to kNTPsocket with message "opened"
   if the result is not empty then
  put the result after msg
   end if
end mouseUp

on opened
   local tTime

   read from socket kNTPsocket until EOF
   put it into tTime
   put tTime after msg
   close socket kNTPSocket
end opened

--
 Mark Wieder
 ahsoftw...@gmail.com

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Internet Date Service test

2018-09-14 Thread Peter Bogdanoff via use-livecode
I’m not seeing how to translate use of an NTP server into "LC-talk.” I would 
love to use it but Google doesn’t seem to have an API that I can access. And I 
would love the dependability of the Google universe.

This one does return JSON:
http://worldclockapi.com <http://worldclockapi.com/>

What I was using before was Julian date which is an easy calculation to use 
with a 30-day free trial. This worldclockapi.com server  returns:
{"$id":"1","currentDateTime":"2018-09-15T03:25Z","utcOffset":"00:00:00","isDayLightSavingsTime":false,"dayOfTheWeek":"Saturday","timeZoneName":"UTC","currentFileTime":13181446165290,"ordinalDate":"2018-258","serviceResponse":null}

The ordinal date could be used, I suppose, to calculate 30 days from now.

Peter


> On Sep 14, 2018, at 8:06 PM, Stephen Barncard via use-livecode 
>  wrote:
> 
> I'd rather use a time server that a lot of people use and is maintained. A
> private web server's clock depends on ...x for reference?
> 
> "Google Public NTP serves leap-smeared time
> <https://developers.google.com/time/smear>. We use this technology to
> smoothly handle leap seconds with no disruptive events.
> 
> We implemented Google Public NTP with our load balancers
> <https://cloud.google.com/load-balancing/> and our fleet of atomic clocks
> in data centers around the world.
> 
>   - Configure your network settings to use time.google.com as your NTP
>   server."
> 
> 
> --
> Stephen Barncard - Sebastopol Ca. USA -
> mixstream.org
> 
> On Fri, Sep 14, 2018 at 7:55 PM, J. Landman Gay via use-livecode <
> use-livecode@lists.runrev.com> wrote:
> 
>> You could put a little one line CGI on your server that just returns the
>> time and date.
>> --
>> Jacqueline Landman Gay | jac...@hyperactivesw.com
>> HyperActive Software | http://www.hyperactivesw.com
>> 
>> On September 14, 2018 8:47:51 PM Peter Bogdanoff via use-livecode <
>> use-livecode@lists.runrev.com> wrote:
>> 
>> Yes, that’s right.
>>> 
>>> We had a report of a user setting back his OS date to extend his demo.
>>> This caused us much consternation, thus the desire for an independent date
>>> source.
>>> 
>>> Peter
>>> 
>>> On Sep 14, 2018, at 5:56 PM, Brian Milby via use-livecode <
>>>> use-livecode@lists.runrev.com> wrote:
>>>> 
>>>> I think the goal is an independent time (date) source to ensure that the
>>>> value is correct. I’m curious about the best solution. Probably would
>>>> involve your own server though.
>>>> 
>>>> Thanks,
>>>> Brian
>>>> On Sep 14, 2018, 7:36 PM -0500, Richard Gaskin via use-livecode <
>>>> use-livecode@lists.runrev.com>, wrote:
>>>> 
>>>>> Peter Bogdanoff wrote:
>>>>> 
>>>>> And… if anyone has a method that doesn’t rely on the user’s local
>>>>>> date/time I’d like to hear that…
>>>>>> 
>>>>> 
>>>>> Using "the seconds" returns a value that accounts for local GMT offset.
>>>>> with the value returned being for GMT.
>>>>> 
>>>>> So if you get the seconds and then display them on a machine set to a
>>>>> different time zone, the time zone will be taken into account when using
>>>>> the convert command to display them in any human-readable format.
>>>>> 
>>>>> FWIW "the internet date" is similarly useful for converting to other
>>>>> formats in ways that take local time zone into account.
>>>>> 
>>>>> AFAIK those are the only two built-in date formats that account for GMT
>>>>> offset, but I've used both for network services where users trade data
>>>>> across many time zones and they work quite well.
>>>>> 
>>>>> --
>>>>> Richard Gaskin
>>>>> Fourth World Systems
>>>>> Software Design and Development for the Desktop, Mobile, and the Web
>>>>> 
>>>>> ambassa...@fourthworld.com http://www.FourthWorld.com
>>>>> 
>>>>> 
>>>>> ___
>>>>> use-livecode mailing list
>>>>> use-livecode@lists.runrev.com
>>>>> Please visit this url to subscribe, unsubscribe and

Re: Internet Date Service test

2018-09-14 Thread Stephen Barncard via use-livecode
I'd rather use a time server that a lot of people use and is maintained. A
private web server's clock depends on ...x for reference?

"Google Public NTP serves leap-smeared time
<https://developers.google.com/time/smear>. We use this technology to
smoothly handle leap seconds with no disruptive events.

We implemented Google Public NTP with our load balancers
<https://cloud.google.com/load-balancing/> and our fleet of atomic clocks
in data centers around the world.

   - Configure your network settings to use time.google.com as your NTP
   server."


--
Stephen Barncard - Sebastopol Ca. USA -
mixstream.org

On Fri, Sep 14, 2018 at 7:55 PM, J. Landman Gay via use-livecode <
use-livecode@lists.runrev.com> wrote:

> You could put a little one line CGI on your server that just returns the
> time and date.
> --
> Jacqueline Landman Gay | jac...@hyperactivesw.com
> HyperActive Software | http://www.hyperactivesw.com
>
> On September 14, 2018 8:47:51 PM Peter Bogdanoff via use-livecode <
> use-livecode@lists.runrev.com> wrote:
>
> Yes, that’s right.
>>
>> We had a report of a user setting back his OS date to extend his demo.
>> This caused us much consternation, thus the desire for an independent date
>> source.
>>
>> Peter
>>
>> On Sep 14, 2018, at 5:56 PM, Brian Milby via use-livecode <
>>> use-livecode@lists.runrev.com> wrote:
>>>
>>> I think the goal is an independent time (date) source to ensure that the
>>> value is correct. I’m curious about the best solution. Probably would
>>> involve your own server though.
>>>
>>> Thanks,
>>> Brian
>>> On Sep 14, 2018, 7:36 PM -0500, Richard Gaskin via use-livecode <
>>> use-livecode@lists.runrev.com>, wrote:
>>>
>>>> Peter Bogdanoff wrote:
>>>>
>>>> And… if anyone has a method that doesn’t rely on the user’s local
>>>>> date/time I’d like to hear that…
>>>>>
>>>>
>>>> Using "the seconds" returns a value that accounts for local GMT offset.
>>>> with the value returned being for GMT.
>>>>
>>>> So if you get the seconds and then display them on a machine set to a
>>>> different time zone, the time zone will be taken into account when using
>>>> the convert command to display them in any human-readable format.
>>>>
>>>> FWIW "the internet date" is similarly useful for converting to other
>>>> formats in ways that take local time zone into account.
>>>>
>>>> AFAIK those are the only two built-in date formats that account for GMT
>>>> offset, but I've used both for network services where users trade data
>>>> across many time zones and they work quite well.
>>>>
>>>> --
>>>> Richard Gaskin
>>>> Fourth World Systems
>>>> Software Design and Development for the Desktop, Mobile, and the Web
>>>> 
>>>> ambassa...@fourthworld.com http://www.FourthWorld.com
>>>>
>>>>
>>>> ___
>>>> use-livecode mailing list
>>>> use-livecode@lists.runrev.com
>>>> Please visit this url to subscribe, unsubscribe and manage your
>>>> subscription preferences:
>>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>>>
>>> ___
>>> use-livecode mailing list
>>> use-livecode@lists.runrev.com
>>> Please visit this url to subscribe, unsubscribe and manage your
>>> subscription preferences:
>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>>
>>
>>
>> ___
>> use-livecode mailing list
>> use-livecode@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>
>
>
>
>
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Internet Date Service test

2018-09-14 Thread J. Landman Gay via use-livecode
You could put a little one line CGI on your server that just returns the 
time and date.

--
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
On September 14, 2018 8:47:51 PM Peter Bogdanoff via use-livecode 
 wrote:



Yes, that’s right.

We had a report of a user setting back his OS date to extend his demo. This 
caused us much consternation, thus the desire for an independent date source.


Peter

On Sep 14, 2018, at 5:56 PM, Brian Milby via use-livecode 
 wrote:


I think the goal is an independent time (date) source to ensure that the 
value is correct. I’m curious about the best solution. Probably would 
involve your own server though.


Thanks,
Brian
On Sep 14, 2018, 7:36 PM -0500, Richard Gaskin via use-livecode 
, wrote:

Peter Bogdanoff wrote:


And… if anyone has a method that doesn’t rely on the user’s local
date/time I’d like to hear that…


Using "the seconds" returns a value that accounts for local GMT offset.
with the value returned being for GMT.

So if you get the seconds and then display them on a machine set to a
different time zone, the time zone will be taken into account when using
the convert command to display them in any human-readable format.

FWIW "the internet date" is similarly useful for converting to other
formats in ways that take local time zone into account.

AFAIK those are the only two built-in date formats that account for GMT
offset, but I've used both for network services where users trade data
across many time zones and they work quite well.

--
Richard Gaskin
Fourth World Systems
Software Design and Development for the Desktop, Mobile, and the Web

ambassa...@fourthworld.com http://www.FourthWorld.com


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your 
subscription preferences:

http://lists.runrev.com/mailman/listinfo/use-livecode

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your 
subscription preferences:

http://lists.runrev.com/mailman/listinfo/use-livecode



___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your 
subscription preferences:

http://lists.runrev.com/mailman/listinfo/use-livecode





___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Internet Date Service test

2018-09-14 Thread Stephen Barncard via use-livecode
how about google time?

https://developers.google.com/time/

--
Stephen Barncard - Sebastopol Ca. USA -
mixstream.org

On Fri, Sep 14, 2018 at 6:45 PM, Peter Bogdanoff via use-livecode <
use-livecode@lists.runrev.com> wrote:

> Yes, that’s right.
>
> We had a report of a user setting back his OS date to extend his demo.
> This caused us much consternation, thus the desire for an independent date
> source.
>
> Peter
>
> > On Sep 14, 2018, at 5:56 PM, Brian Milby via use-livecode <
> use-livecode@lists.runrev.com> wrote:
> >
> > I think the goal is an independent time (date) source to ensure that the
> value is correct. I’m curious about the best solution. Probably would
> involve your own server though.
> >
> > Thanks,
> > Brian
> > On Sep 14, 2018, 7:36 PM -0500, Richard Gaskin via use-livecode <
> use-livecode@lists.runrev.com>, wrote:
> >> Peter Bogdanoff wrote:
> >>
> >>> And… if anyone has a method that doesn’t rely on the user’s local
> >>> date/time I’d like to hear that…
> >>
> >> Using "the seconds" returns a value that accounts for local GMT offset.
> >> with the value returned being for GMT.
> >>
> >> So if you get the seconds and then display them on a machine set to a
> >> different time zone, the time zone will be taken into account when using
> >> the convert command to display them in any human-readable format.
> >>
> >> FWIW "the internet date" is similarly useful for converting to other
> >> formats in ways that take local time zone into account.
> >>
> >> AFAIK those are the only two built-in date formats that account for GMT
> >> offset, but I've used both for network services where users trade data
> >> across many time zones and they work quite well.
> >>
> >> --
> >> Richard Gaskin
> >> Fourth World Systems
> >> Software Design and Development for the Desktop, Mobile, and the Web
> >> 
> >> ambassa...@fourthworld.com http://www.FourthWorld.com
> >>
> >>
> >> ___
> >> use-livecode mailing list
> >> use-livecode@lists.runrev.com
> >> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> >> http://lists.runrev.com/mailman/listinfo/use-livecode
> > ___
> > use-livecode mailing list
> > use-livecode@lists.runrev.com
> > Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> > http://lists.runrev.com/mailman/listinfo/use-livecode
>
>
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Internet Date Service test

2018-09-14 Thread Peter Bogdanoff via use-livecode
Yes, that’s right.

We had a report of a user setting back his OS date to extend his demo. This 
caused us much consternation, thus the desire for an independent date source.

Peter

> On Sep 14, 2018, at 5:56 PM, Brian Milby via use-livecode 
>  wrote:
> 
> I think the goal is an independent time (date) source to ensure that the 
> value is correct. I’m curious about the best solution. Probably would involve 
> your own server though.
> 
> Thanks,
> Brian
> On Sep 14, 2018, 7:36 PM -0500, Richard Gaskin via use-livecode 
> , wrote:
>> Peter Bogdanoff wrote:
>> 
>>> And… if anyone has a method that doesn’t rely on the user’s local
>>> date/time I’d like to hear that…
>> 
>> Using "the seconds" returns a value that accounts for local GMT offset.
>> with the value returned being for GMT.
>> 
>> So if you get the seconds and then display them on a machine set to a
>> different time zone, the time zone will be taken into account when using
>> the convert command to display them in any human-readable format.
>> 
>> FWIW "the internet date" is similarly useful for converting to other
>> formats in ways that take local time zone into account.
>> 
>> AFAIK those are the only two built-in date formats that account for GMT
>> offset, but I've used both for network services where users trade data
>> across many time zones and they work quite well.
>> 
>> --
>> Richard Gaskin
>> Fourth World Systems
>> Software Design and Development for the Desktop, Mobile, and the Web
>> 
>> ambassa...@fourthworld.com http://www.FourthWorld.com
>> 
>> 
>> ___
>> use-livecode mailing list
>> use-livecode@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription 
>> preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Internet Date Service test

2018-09-14 Thread Brian Milby via use-livecode
I think the goal is an independent time (date) source to ensure that the value 
is correct. I’m curious about the best solution. Probably would involve your 
own server though.

Thanks,
Brian
On Sep 14, 2018, 7:36 PM -0500, Richard Gaskin via use-livecode 
, wrote:
> Peter Bogdanoff wrote:
>
> > And… if anyone has a method that doesn’t rely on the user’s local
> > date/time I’d like to hear that…
>
> Using "the seconds" returns a value that accounts for local GMT offset.
> with the value returned being for GMT.
>
> So if you get the seconds and then display them on a machine set to a
> different time zone, the time zone will be taken into account when using
> the convert command to display them in any human-readable format.
>
> FWIW "the internet date" is similarly useful for converting to other
> formats in ways that take local time zone into account.
>
> AFAIK those are the only two built-in date formats that account for GMT
> offset, but I've used both for network services where users trade data
> across many time zones and they work quite well.
>
> --
> Richard Gaskin
> Fourth World Systems
> Software Design and Development for the Desktop, Mobile, and the Web
> 
> ambassa...@fourthworld.com http://www.FourthWorld.com
>
>
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Internet Date Service test

2018-09-14 Thread Richard Gaskin via use-livecode

Peter Bogdanoff wrote:

> And… if anyone has a method that doesn’t rely on the user’s local
> date/time I’d like to hear that…

Using "the seconds" returns a value that accounts for local GMT offset. 
with the value returned being for GMT.


So if you get the seconds and then display them on a machine set to a 
different time zone, the time zone will be taken into account when using 
the convert command to display them in any human-readable format.


FWIW "the internet date" is similarly useful for converting to other 
formats in ways that take local time zone into account.


AFAIK those are the only two built-in date formats that account for GMT 
offset, but I've used both for network services where users trade data 
across many time zones and they work quite well.


--
 Richard Gaskin
 Fourth World Systems
 Software Design and Development for the Desktop, Mobile, and the Web
 
 ambassa...@fourthworld.comhttp://www.FourthWorld.com


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Internet Date Service test

2018-09-14 Thread Peter Bogdanoff via use-livecode
That sounds plausible.

I am getting uneven results with this…

Is this a job for LC Server? To return the seconds and then do my calculations 
from that?

Peter

> On Sep 14, 2018, at 4:06 PM, Bob Sneidar via use-livecode 
>  wrote:
> 
> Also it dawns on me that the US Navy may firewall it's own time servers so 
> that they are no DOS attacked. 
> 
> Bob S
> 
> 
>> On Sep 14, 2018, at 15:58 , Bob Sneidar via use-livecode 
>>  wrote:
>> 
>> While the USA does not firewall it's internet, there are countries that do. 
>> Costa Rica may be one of them. 
>> 
>> Bob S
>> 
>> 
>>> On Sep 14, 2018, at 15:33 , Peter Bogdanoff via use-livecode 
>>>  wrote:
>>> 
>>> It seems to work well in on my computer and others in the USA, but a 
>>> Windows tester in Costa Rica can’t seem to get a response. I haven’t 
>>> figured out if this is a programming or Internet issue, and it’s difficult 
>>> to determine since it works well for me on Mac and Windows.
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Internet Date Service test

2018-09-14 Thread Bob Sneidar via use-livecode
Also it dawns on me that the US Navy may firewall it's own time servers so that 
they are no DOS attacked. 

Bob S


> On Sep 14, 2018, at 15:58 , Bob Sneidar via use-livecode 
>  wrote:
> 
> While the USA does not firewall it's internet, there are countries that do. 
> Costa Rica may be one of them. 
> 
> Bob S
> 
> 
>> On Sep 14, 2018, at 15:33 , Peter Bogdanoff via use-livecode 
>>  wrote:
>> 
>> It seems to work well in on my computer and others in the USA, but a Windows 
>> tester in Costa Rica can’t seem to get a response. I haven’t figured out if 
>> this is a programming or Internet issue, and it’s difficult to determine 
>> since it works well for me on Mac and Windows.

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Internet Date Service test

2018-09-14 Thread Bob Sneidar via use-livecode
While the USA does not firewall it's internet, there are countries that do. 
Costa Rica may be one of them. 

Bob S


> On Sep 14, 2018, at 15:33 , Peter Bogdanoff via use-livecode 
>  wrote:
> 
> It seems to work well in on my computer and others in the USA, but a Windows 
> tester in Costa Rica can’t seem to get a response. I haven’t figured out if 
> this is a programming or Internet issue, and it’s difficult to determine 
> since it works well for me on Mac and Windows.

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Internet Date Service test

2018-09-14 Thread Stephen Barncard via use-livecode
Hi Peter,

why don't you consider a VPN for such testing? It can place you in any
country you need, and you get immediate confirmation.   VPN's are plentiful
and free to cheap.

sqb

--
Stephen Barncard - Sebastopol Ca. USA -
mixstream.org

On Fri, Sep 14, 2018 at 3:33 PM, Peter Bogdanoff via use-livecode <
use-livecode@lists.runrev.com> wrote:

> Hi,
>
> For trial version expiration of my program, I’ve been attempting to use
> the US Naval Observatory time service which has an API that returns info as
> JSON data:
>
> http://aa.usno.navy.mil/data/docs/api.php#jdconv <
> http://aa.usno.navy.mil/data/docs/api.php#jdconv>
>
> My request:
> put URL "http://api.usno.navy.mil/jdconverter?date=today=
> 22:15:23.5=ArtsInteractive" into sJulianDateJSON
>
> I have a handler that checks for the local variable sJulianDateJSON to
> contain the returned data, then I use the current Julian date returned (the
> number of days since January 1, 4713 BC) to write and check on the current
> date and expiration dates.
>
> It seems to work well in on my computer and others in the USA, but a
> Windows tester in Costa Rica can’t seem to get a response. I haven’t
> figured out if this is a programming or Internet issue, and it’s difficult
> to determine since it works well for me on Mac and Windows.
>
>
>
> Would any of you test this small LC stack — in the USA or elsewhere? And
> send me results directly to my email address?
>
> https://artsinteractive-products.s3.amazonaws.com/
> MITA/Get_Julian_Date.livecode.zip <https://artsinteractive-
> products.s3.amazonaws.com/MITA/Get_Julian_Date.livecode.zip>
>
> 1. Click “Get Julian Date”. If it works, it should show a number in the
> “Julian Date” field after a few seconds.
> 2. “Clear” resets the result fields
> 3. The top field “Try x times” can be set to a larger number if necessary.
> 4. If it works the “Send Email” will attempt to use your email client to
> email me the results.
>
>
> And… if anyone has a method that doesn’t rely on the user’s local
> date/time I’d like to hear that…
>
> Thanks!
>
> Peter Bogdanoff
> ArtsInteractive
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Internet Date Service test

2018-09-14 Thread Peter Bogdanoff via use-livecode
Hi,

For trial version expiration of my program, I’ve been attempting to use the US 
Naval Observatory time service which has an API that returns info as JSON data:

http://aa.usno.navy.mil/data/docs/api.php#jdconv 
<http://aa.usno.navy.mil/data/docs/api.php#jdconv>

My request:
put URL 
"http://api.usno.navy.mil/jdconverter?date=today=22:15:23.5=ArtsInteractive;
 into sJulianDateJSON

I have a handler that checks for the local variable sJulianDateJSON to contain 
the returned data, then I use the current Julian date returned (the number of 
days since January 1, 4713 BC) to write and check on the current date and 
expiration dates.

It seems to work well in on my computer and others in the USA, but a Windows 
tester in Costa Rica can’t seem to get a response. I haven’t figured out if 
this is a programming or Internet issue, and it’s difficult to determine since 
it works well for me on Mac and Windows.



Would any of you test this small LC stack — in the USA or elsewhere? And send 
me results directly to my email address?

https://artsinteractive-products.s3.amazonaws.com/MITA/Get_Julian_Date.livecode.zip
 
<https://artsinteractive-products.s3.amazonaws.com/MITA/Get_Julian_Date.livecode.zip>

1. Click “Get Julian Date”. If it works, it should show a number in the “Julian 
Date” field after a few seconds.
2. “Clear” resets the result fields
3. The top field “Try x times” can be set to a larger number if necessary.
4. If it works the “Send Email” will attempt to use your email client to email 
me the results.


And… if anyone has a method that doesn’t rely on the user’s local date/time I’d 
like to hear that…

Thanks!

Peter Bogdanoff
ArtsInteractive
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Up to date installation guide for LiveCode community server?

2018-09-02 Thread Tom Glod via use-livecode
This is the bash scripts I  used to successfully install LC
Server...obviously it has customized filenames in it.

#!/bin/bash
#-
# install LC Server
#-

cd ~
wget "
https://ump-global-shared-space.nyc3.digitaloceanspaces.com/ump-cloud-build-scripts/LiveCodeCommunityServer-8_1_7-Linux-x86_64.zip
"
apt-get install unzip
unzip LiveCodeCommunityServer-8_1_7-Linux-x86_64.zip
rm LiveCodeCommunityServer-8_1_7-Linux-x86_64.zip
chmod 755 livecode-community-server
mv 'livecode-community-server' '/usr/lib/cgi-bin'
mv 'externals' '/usr/lib/cgi-bin'
mv 'drivers' '/usr/lib/cgi-bin'

#-
# Set Up Apache
#-

a2enmod actions
a2enmod cgi
cd /etc/apache2/sites-enabled
wget "
https://ump-global-shared-space.nyc3.digitaloceanspaces.com/ump-cloud-build-scripts/default_apache_config_registration_server.conf
"
cp 'default_apache_config_registration_server.conf' '000-default.conf'
rm default_apache_config_registration_server.conf
service apache2 restart


*Apache CONF File:*


ServerName ump-cloud.com
ServerAlias www.ump-cloud.com
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html


Options Indexes FollowSymLinks
AllowOverride All
Require all granted


ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined


DirectoryIndex index.php index.pl index.cgi index.html
index.xhtml index.htm


Action lc-script /cgi-bin/livecode-community-server
AddHandler lc-script .lc




On Sun, Sep 2, 2018 at 4:50 PM Malte Pfaff-Brill via use-livecode <
use-livecode@lists.runrev.com> wrote:

> @Mark: Thanks, will do.
> @Richard: I am not facing any trouble, but have to provide an installation
> guide for 3rd parties that would like to run an open source project I
> steward. The problem with the current documentation I dug up is that it
> appears to be written for apache <2.2. And that the actual installation
> guide is not in the package that one would download from livecode's site.
> Also the documentation says the Linux distribution would require the 32-Bit
> Libs, which I am pretty sure is no longer true.
>
> Cheers,
>
> Malte
>
>
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Up to date installation guide for LiveCode community server?

2018-09-02 Thread Malte Pfaff-Brill via use-livecode
@Mark: Thanks, will do.
@Richard: I am not facing any trouble, but have to provide an installation 
guide for 3rd parties that would like to run an open source project I steward. 
The problem with the current documentation I dug up is that it appears to be 
written for apache <2.2. And that the actual installation guide is not in the 
package that one would download from livecode's site. Also the documentation 
says the Linux distribution would require the 32-Bit Libs, which I am pretty 
sure is no longer true.

Cheers,

Malte


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Up to date installation guide for LiveCode community server?

2018-09-02 Thread Mark Waddingham via use-livecode
File a bug and we'll see if we can move the (appropriate) information into a 
guide in the main repo (so the docs aren't just a webpage).

mergJSON is licensed under the GPL - 
https://github.com/montegoulding/mergJSON/blob/master/LICENSE.txt

Warmest Regards,

Mark

Sent from my iPhone

> On 2 Sep 2018, at 14:36, Malte Pfaff-Brill via use-livecode 
>  wrote:
> 
> Hi all,
> 
> I am currently searching for an up to date installation guide for live code 
> community server. For at least Linux 64 Bit and Windows Servers. What I was 
> able to dig up on the liveCode sites is rather outdated. :-(
> Also, is it allowed to add the jSon externals to a community server? 
> Technically it appears to work, but license wise? If that is possible, might 
> it be good to have it in the downloaded external folder by< default?
> 
> Cheers!
> 
> Malte
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Up to date installation guide for LiveCode community server?

2018-09-02 Thread Richard Gaskin via use-livecode
Malte Pfaff-Brill wrote:

> I am currently searching for an up to date installation guide for live
> code community server. For at least Linux 64 Bit and Windows Servers.
> What I was able to dig up on the liveCode sites is rather outdated.
> :-(

The Common Gateway Interface LC uses is pretty standard and hasn't
changed in a long time.  Setting up LC should be pretty much the same as
adding any other scripting engine to an Apache server.  What problems
have you run into?

--
 Richard Gaskin
 Fourth World Systems
 Software Design and Development for the Desktop, Mobile, and the Web
 
 ambassa...@fourthworld.comhttp://www.FourthWorld.com

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Up to date installation guide for LiveCode community server?

2018-09-02 Thread Malte Pfaff-Brill via use-livecode
Hi all,

I am currently searching for an up to date installation guide for live code 
community server. For at least Linux 64 Bit and Windows Servers. What I was 
able to dig up on the liveCode sites is rather outdated. :-(
Also, is it allowed to add the jSon externals to a community server? 
Technically it appears to work, but license wise? If that is possible, might it 
be good to have it in the downloaded external folder by< default?

Cheers!

Malte
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


  1   2   3   4   5   >