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


Re: date libraries/routines for LCG

2018-05-09 Thread Bob Sneidar via use-livecode
Yes, I contributed to the Master Library a couple of date and time functions 
which return formats which LC does not provide. One is sql date which returns 
the date in the format -mm-dd, The second is julian date which uses Jacques 
method (I understand there is not simply one Julian standard!) 

For time I have sql time (hh:mm:ss) and military, returning the time in 24 hour 
format. 

So for instance you can convert to sql datetime format by using formatDate(the 
date, "sql date) && formatTime(the time, "sql time"). 

I'm not sure if the Master Library made some improvement on the functions I 
submitted, but here is what I have:

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 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
   
   convert theDate to dateitems
   set the itemdelimiter to theOldDelim
   
   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


> On May 8, 2018, at 18:14 , Mike Doub via use-livecode 
> <use-livecode@lists.runrev.com> wrote:
> 
> H

Re: date libraries/routines for LCG

2018-05-09 Thread ELS prothero via use-livecode
Dave:
Done.
Bill

William Prothero, PhD
Professor Emeritus
University of California, Santa Barbara
http://earthlearningsolutions.org

> On May 9, 2018, at 8:32 AM, Mike Kerner via use-livecode 
> <use-livecode@lists.runrev.com> wrote:
> 
> Thank you...
> 
> On Wed, May 9, 2018 at 11:29 AM Brian Milby via use-livecode <
> use-livecode@lists.runrev.com> wrote:
> 
>> Is this one on your list?
>> 
>> LiveCode library to handle date and time functions
>> https://github.com/derbrill/libdate
>> 
>> On Wed, May 9, 2018 at 8:57 AM Mike Kerner via use-livecode <
>> use-livecode@lists.runrev.com> wrote:
>> 
>>> Yep, Master is on my list, but I should make sure I pull the latest
>>> version.
>>> 
>>> On Tue, May 8, 2018 at 9:14 PM Mike Doub via use-livecode <
>>> use-livecode@lists.runrev.com> wrote:
>>> 
>>>> Have you checked the Master Library?
>>>> 
>>>> https://www.dropbox.com/s/3wpwn3hfbmpl7sk/MasterLibrary.livecode?dl=0
>>>> 
>>>> On May 8, 2018, 9:10 PM -0400, Mike Kerner via use-livecode <
>>>> use-livecode@lists.runrev.com>, wrote:
>>>>> I'm working on my session for next week's lcg, which is going to
>> focus
>>> on
>>>>> dates. I'd like to feature any libraries or routines that anyone
>> wants
>>> to
>>>>> share that have to do with dates.
>>>>> Please email me at one of my 300 email addresses.
>>>>> 
>>>>> --
>>>>> On the first day, God created the heavens and the Earth
>>>>> On the second day, God created the oceans.
>>>>> On the third day, God put the animals on hold for a few hours,
>>>>> and did a little diving.
>>>>> And God said, "This is good."
>>>>> ___
>>>>> 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
>>>> 
>>> 
>>> 
>>> --
>>> On the first day, God created the heavens and the Earth
>>> On the second day, God created the oceans.
>>> On the third day, God put the animals on hold for a few hours,
>>>   and did a little diving.
>>> And God said, "This is good."
>>> ___
>>> 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
>> 
> 
> 
> -- 
> On the first day, God created the heavens and the Earth
> On the second day, God created the oceans.
> On the third day, God put the animals on hold for a few hours,
>   and did a little diving.
> And God said, "This is good."
> ___
> 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 libraries/routines for LCG

2018-05-09 Thread Mike Kerner via use-livecode
Thank you...

On Wed, May 9, 2018 at 11:29 AM Brian Milby via use-livecode <
use-livecode@lists.runrev.com> wrote:

> Is this one on your list?
>
> LiveCode library to handle date and time functions
> https://github.com/derbrill/libdate
>
> On Wed, May 9, 2018 at 8:57 AM Mike Kerner via use-livecode <
> use-livecode@lists.runrev.com> wrote:
>
> > Yep, Master is on my list, but I should make sure I pull the latest
> > version.
> >
> > On Tue, May 8, 2018 at 9:14 PM Mike Doub via use-livecode <
> > use-livecode@lists.runrev.com> wrote:
> >
> > > Have you checked the Master Library?
> > >
> > > https://www.dropbox.com/s/3wpwn3hfbmpl7sk/MasterLibrary.livecode?dl=0
> > >
> > > On May 8, 2018, 9:10 PM -0400, Mike Kerner via use-livecode <
> > > use-livecode@lists.runrev.com>, wrote:
> > > > I'm working on my session for next week's lcg, which is going to
> focus
> > on
> > > > dates. I'd like to feature any libraries or routines that anyone
> wants
> > to
> > > > share that have to do with dates.
> > > > Please email me at one of my 300 email addresses.
> > > >
> > > > --
> > > > On the first day, God created the heavens and the Earth
> > > > On the second day, God created the oceans.
> > > > On the third day, God put the animals on hold for a few hours,
> > > > and did a little diving.
> > > > And God said, "This is good."
> > > > ___
> > > > 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
> > >
> >
> >
> > --
> > On the first day, God created the heavens and the Earth
> > On the second day, God created the oceans.
> > On the third day, God put the animals on hold for a few hours,
> >and did a little diving.
> > And God said, "This is good."
> > ___
> > 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
>


-- 
On the first day, God created the heavens and the Earth
On the second day, God created the oceans.
On the third day, God put the animals on hold for a few hours,
   and did a little diving.
And God said, "This is good."
___
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 libraries/routines for LCG

2018-05-09 Thread Brian Milby via use-livecode
Is this one on your list?

LiveCode library to handle date and time functions
https://github.com/derbrill/libdate

On Wed, May 9, 2018 at 8:57 AM Mike Kerner via use-livecode <
use-livecode@lists.runrev.com> wrote:

> Yep, Master is on my list, but I should make sure I pull the latest
> version.
>
> On Tue, May 8, 2018 at 9:14 PM Mike Doub via use-livecode <
> use-livecode@lists.runrev.com> wrote:
>
> > Have you checked the Master Library?
> >
> > https://www.dropbox.com/s/3wpwn3hfbmpl7sk/MasterLibrary.livecode?dl=0
> >
> > On May 8, 2018, 9:10 PM -0400, Mike Kerner via use-livecode <
> > use-livecode@lists.runrev.com>, wrote:
> > > I'm working on my session for next week's lcg, which is going to focus
> on
> > > dates. I'd like to feature any libraries or routines that anyone wants
> to
> > > share that have to do with dates.
> > > Please email me at one of my 300 email addresses.
> > >
> > > --
> > > On the first day, God created the heavens and the Earth
> > > On the second day, God created the oceans.
> > > On the third day, God put the animals on hold for a few hours,
> > > and did a little diving.
> > > And God said, "This is good."
> > > ___
> > > 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
> >
>
>
> --
> On the first day, God created the heavens and the Earth
> On the second day, God created the oceans.
> On the third day, God put the animals on hold for a few hours,
>and did a little diving.
> And God said, "This is good."
> ___
> 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 libraries/routines for LCG

2018-05-09 Thread Mike Kerner via use-livecode
Yep, Master is on my list, but I should make sure I pull the latest version.

On Tue, May 8, 2018 at 9:14 PM Mike Doub via use-livecode <
use-livecode@lists.runrev.com> wrote:

> Have you checked the Master Library?
>
> https://www.dropbox.com/s/3wpwn3hfbmpl7sk/MasterLibrary.livecode?dl=0
>
> On May 8, 2018, 9:10 PM -0400, Mike Kerner via use-livecode <
> use-livecode@lists.runrev.com>, wrote:
> > I'm working on my session for next week's lcg, which is going to focus on
> > dates. I'd like to feature any libraries or routines that anyone wants to
> > share that have to do with dates.
> > Please email me at one of my 300 email addresses.
> >
> > --
> > On the first day, God created the heavens and the Earth
> > On the second day, God created the oceans.
> > On the third day, God put the animals on hold for a few hours,
> > and did a little diving.
> > And God said, "This is good."
> > ___
> > 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
>


-- 
On the first day, God created the heavens and the Earth
On the second day, God created the oceans.
On the third day, God put the animals on hold for a few hours,
   and did a little diving.
And God said, "This is good."
___
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 libraries/routines for LCG

2018-05-08 Thread Mike Doub via use-livecode
Have you checked the Master Library?

https://www.dropbox.com/s/3wpwn3hfbmpl7sk/MasterLibrary.livecode?dl=0

On May 8, 2018, 9:10 PM -0400, Mike Kerner via use-livecode 
, wrote:
> I'm working on my session for next week's lcg, which is going to focus on
> dates. I'd like to feature any libraries or routines that anyone wants to
> share that have to do with dates.
> Please email me at one of my 300 email addresses.
>
> --
> On the first day, God created the heavens and the Earth
> On the second day, God created the oceans.
> On the third day, God put the animals on hold for a few hours,
> and did a little diving.
> And God said, "This is good."
> ___
> 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 libraries/routines for LCG

2018-05-08 Thread Mike Kerner via use-livecode
I'm working on my session for next week's lcg, which is going to focus on
dates.  I'd like to feature any libraries or routines that anyone wants to
share that have to do with dates.
Please email me at one of my 300 email addresses.

-- 
On the first day, God created the heavens and the Earth
On the second day, God created the oceans.
On the third day, God put the animals on hold for a few hours,
   and did a little diving.
And God said, "This is good."
___
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: is a date

2017-10-20 Thread Bob Sneidar via use-livecode
Because Friday, October 20, 2017 is also a date. So is 2017-10-20. So is 
2017/10/20. So is 17/10/20 amd 9/20/17. 

Bob S


> On Oct 20, 2017, at 08:43 , trevix via use-livecode 
> <use-livecode@lists.runrev.com> wrote:
> 
> How about this:
> 
> function IsDate pDate, pSysDate
> 
> if pSysDate then
> 
> put char 3 of the short system dateformat into tDelimiter
> 
> else
> 
> put char 3 of the short dateformat into tDelimiter
> 
> end if
> 
> if tDelimiter is in pDate and pDate is a date then return true
> 
> return false
> 
> end IsDate
> 
> trevix
> ___
> 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: is a date

2017-10-20 Thread trevix via use-livecode
How about this:

function IsDate pDate, pSysDate

if pSysDate then

put char 3 of the short system dateformat into tDelimiter

else

put char 3 of the short dateformat into tDelimiter

end if

if tDelimiter is in pDate and pDate is a date then return true

return false

end IsDate

trevix
___
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: is a date

2017-10-16 Thread Mike Kerner via use-livecode
Did I miss someone checking if the allegedly valid date is really a valid
date?  I don't think 99/99/99 is valid.

On Mon, Oct 16, 2017 at 2:07 PM, Mike Kerner <mikeker...@roadrunner.com>
wrote:

> HEY BOB COPYCAT!
>
> On Mon, Oct 16, 2017 at 1:34 PM, Bob Sneidar via use-livecode <
> use-livecode@lists.runrev.com> wrote:
>
>> May want to check out the MasterLibrary then. It's got a lot of great
>> commands and functinos, one of which will format a date any way you like,
>> including sql date.
>>
>> Bob S
>>
>>
>> > On Oct 16, 2017, at 10:14 , Andrew Bell via use-livecode <
>> use-livecode@lists.runrev.com> wrote:
>> >
>> >> From: Bob Sneidar <bobsnei...@iotecdigital.com>
>> >> To: How to use LiveCode <use-livecode@lists.runrev.com>
>> >> Subject: Re: is a date
>> >> Message-ID: <6eb529a3-5d21-4186-bd90-641746e96...@iotecdigital.com>
>> >> Content-Type: text/plain; charset="us-ascii"
>> >>
>> >> This probably matters to no one at all, but SQL does not store dates
>> with forward slashes. SQL datetime formats look like this:
>> >>
>> >> -dd-mm hh:mm:ss
>> >>
>> >> Bob S
>> >>
>> >
>> > It mattered to me recently on a project I was working on so I wrote
>> these two scripts to help me generate a LC version of the mySQL version of
>> "timestamp":
>> >
>> > on timeStamp
>> >   put the internet date into tTheDate
>> >   convert tTheDate to dateitems
>> >   put item 1 of tTheDate into tYear
>> >   put item 2 of tTheDate into tMonth
>> >   put item 3 of tTheDate into tDay
>> >   put item 4 of tTheDate into tHour
>> >   put item 5 of tTheDate into tMinute
>> >   put item 6 of tTheDate into tSecond
>> >
>> >   leadingZero tMonth
>> >   leadingZero tDay
>> >   leadingZero tHour
>> >   leadingZero tMinute
>> >   leadingZero tSecond
>> >
>> >   put tYear & "-" & tMonth & "-" & tDay && tHour & ":" & tMinute & ":"
>> & tSecond into tTimeStamp
>> >   return tTimeStamp
>> > end timeStamp
>> >
>> > on leadingZero @pDateItem
>> >   if the length of pDateItem = 1 then
>> >  put "0" before pDateItem
>> >   end if
>> > end leadingZero
>> >
>> >
>> > A new date/time format of "database" would be useful for something like
>> this.
>> >
>> > --Andrew Bell
>> >
>> >
>> > ___
>> > 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
>>
>
>
>
> --
> On the first day, God created the heavens and the Earth
> On the second day, God created the oceans.
> On the third day, God put the animals on hold for a few hours,
>and did a little diving.
> And God said, "This is good."
>



-- 
On the first day, God created the heavens and the Earth
On the second day, God created the oceans.
On the third day, God put the animals on hold for a few hours,
   and did a little diving.
And God said, "This is good."
___
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: is a date

2017-10-16 Thread Mike Kerner via use-livecode
HEY BOB COPYCAT!

On Mon, Oct 16, 2017 at 1:34 PM, Bob Sneidar via use-livecode <
use-livecode@lists.runrev.com> wrote:

> May want to check out the MasterLibrary then. It's got a lot of great
> commands and functinos, one of which will format a date any way you like,
> including sql date.
>
> Bob S
>
>
> > On Oct 16, 2017, at 10:14 , Andrew Bell via use-livecode <
> use-livecode@lists.runrev.com> wrote:
> >
> >> From: Bob Sneidar <bobsnei...@iotecdigital.com>
> >> To: How to use LiveCode <use-livecode@lists.runrev.com>
> >> Subject: Re: is a date
> >> Message-ID: <6eb529a3-5d21-4186-bd90-641746e96...@iotecdigital.com>
> >> Content-Type: text/plain; charset="us-ascii"
> >>
> >> This probably matters to no one at all, but SQL does not store dates
> with forward slashes. SQL datetime formats look like this:
> >>
> >> -dd-mm hh:mm:ss
> >>
> >> Bob S
> >>
> >
> > It mattered to me recently on a project I was working on so I wrote
> these two scripts to help me generate a LC version of the mySQL version of
> "timestamp":
> >
> > on timeStamp
> >   put the internet date into tTheDate
> >   convert tTheDate to dateitems
> >   put item 1 of tTheDate into tYear
> >   put item 2 of tTheDate into tMonth
> >   put item 3 of tTheDate into tDay
> >   put item 4 of tTheDate into tHour
> >   put item 5 of tTheDate into tMinute
> >   put item 6 of tTheDate into tSecond
> >
> >   leadingZero tMonth
> >   leadingZero tDay
> >   leadingZero tHour
> >   leadingZero tMinute
> >   leadingZero tSecond
> >
> >   put tYear & "-" & tMonth & "-" & tDay && tHour & ":" & tMinute & ":" &
> tSecond into tTimeStamp
> >   return tTimeStamp
> > end timeStamp
> >
> > on leadingZero @pDateItem
> >   if the length of pDateItem = 1 then
> >  put "0" before pDateItem
> >   end if
> > end leadingZero
> >
> >
> > A new date/time format of "database" would be useful for something like
> this.
> >
> > --Andrew Bell
> >
> >
> > ___
> > 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
>



-- 
On the first day, God created the heavens and the Earth
On the second day, God created the oceans.
On the third day, God put the animals on hold for a few hours,
   and did a little diving.
And God said, "This is good."
___
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: is a date

2017-10-16 Thread Bob Sneidar via use-livecode
May want to check out the MasterLibrary then. It's got a lot of great commands 
and functinos, one of which will format a date any way you like, including sql 
date. 

Bob S


> On Oct 16, 2017, at 10:14 , Andrew Bell via use-livecode 
> <use-livecode@lists.runrev.com> wrote:
> 
>> From: Bob Sneidar <bobsnei...@iotecdigital.com>
>> To: How to use LiveCode <use-livecode@lists.runrev.com>
>> Subject: Re: is a date
>> Message-ID: <6eb529a3-5d21-4186-bd90-641746e96...@iotecdigital.com>
>> Content-Type: text/plain; charset="us-ascii"
>> 
>> This probably matters to no one at all, but SQL does not store dates with 
>> forward slashes. SQL datetime formats look like this:
>> 
>> -dd-mm hh:mm:ss
>> 
>> Bob S
>> 
> 
> It mattered to me recently on a project I was working on so I wrote these two 
> scripts to help me generate a LC version of the mySQL version of "timestamp":
> 
> on timeStamp
>   put the internet date into tTheDate
>   convert tTheDate to dateitems
>   put item 1 of tTheDate into tYear
>   put item 2 of tTheDate into tMonth
>   put item 3 of tTheDate into tDay
>   put item 4 of tTheDate into tHour
>   put item 5 of tTheDate into tMinute
>   put item 6 of tTheDate into tSecond
> 
>   leadingZero tMonth
>   leadingZero tDay
>   leadingZero tHour
>   leadingZero tMinute
>   leadingZero tSecond
> 
>   put tYear & "-" & tMonth & "-" & tDay && tHour & ":" & tMinute & ":" & 
> tSecond into tTimeStamp
>   return tTimeStamp
> end timeStamp
> 
> on leadingZero @pDateItem
>   if the length of pDateItem = 1 then
>  put "0" before pDateItem
>   end if
> end leadingZero
> 
> 
> A new date/time format of "database" would be useful for something like this.
> 
> --Andrew Bell
> 
> 
> ___
> 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: is a date

2017-10-16 Thread Andrew Bell via use-livecode

From: Bob Sneidar <bobsnei...@iotecdigital.com>
To: How to use LiveCode <use-livecode@lists.runrev.com>
Subject: Re: is a date
Message-ID: <6eb529a3-5d21-4186-bd90-641746e96...@iotecdigital.com>
Content-Type: text/plain; charset="us-ascii"

This probably matters to no one at all, but SQL does not store dates  
with forward slashes. SQL datetime formats look like this:


-dd-mm hh:mm:ss

Bob S



It mattered to me recently on a project I was working on so I wrote  
these two scripts to help me generate a LC version of the mySQL  
version of "timestamp":


on timeStamp
   put the internet date into tTheDate
   convert tTheDate to dateitems
   put item 1 of tTheDate into tYear
   put item 2 of tTheDate into tMonth
   put item 3 of tTheDate into tDay
   put item 4 of tTheDate into tHour
   put item 5 of tTheDate into tMinute
   put item 6 of tTheDate into tSecond

   leadingZero tMonth
   leadingZero tDay
   leadingZero tHour
   leadingZero tMinute
   leadingZero tSecond

   put tYear & "-" & tMonth & "-" & tDay && tHour & ":" & tMinute &  
":" & tSecond into tTimeStamp

   return tTimeStamp
end timeStamp

on leadingZero @pDateItem
   if the length of pDateItem = 1 then
  put "0" before pDateItem
   end if
end leadingZero


A new date/time format of "database" would be useful for something like this.

--Andrew Bell


___
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: is a date

2017-10-16 Thread Roger Eller via use-livecode
Again, I would prefer a simple one-liner built-in function.  What if
instead of "is a date" returning true or false, it instead returned some
expected outputs like "short, long, internet, seconds, ect.".  Something
short and sweet.

~Roger

On Mon, Oct 16, 2017 at 12:56 PM, Bob Sneidar via use-livecode <
use-livecode@lists.runrev.com> wrote:

> This probably matters to no one at all, but SQL does not store dates with
> forward slashes. SQL datetime formats look like this:
>
> -dd-mm hh:mm:ss
>
> 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: is a date

2017-10-16 Thread Bob Sneidar via use-livecode
This probably matters to no one at all, but SQL does not store dates with 
forward slashes. SQL datetime formats look like this:

-dd-mm hh:mm:ss

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: is a date

2017-10-16 Thread Bob Sneidar via use-livecode
This of course assumes you know tDate is supposed to be a short date. 

I also have this function which is part of the master library methinks:

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 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
   
   convert theDate to dateitems
   set the itemdelimiter to theOldDelim
   
   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

Bob S


> On Oct 16, 2017, at 09:47 , Bob Sneidar <bobsnei...@iotecdigital.com> wrote:
> 
> Old trick I learned in Foxpro. Convert something then convert it back and see 
> if it is identical. 
> 
> put 20 into tDate
> put tDate into tOldDate
> convert tDate to dateitems
> convert tDate to short date
> return ((tDate is a date) and (tDate is tOldDate))
> 
> 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: is a date

2017-10-16 Thread Bob Sneidar via use-livecode
Old trick I learned in Foxpro. Convert something then convert it back and see 
if it is identical. 

put 20 into tDate
put tDate into tOldDate
convert tDate to dateitems
convert tDate to short date
return ((tDate is a date) and (tDate is tOldDate))

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: is a date

2017-10-16 Thread Roger Eller via use-livecode
Exactly!  I was elated to find the built-in "is a date" check, because I
really wanted to NOT have to roll my own.  I was THRILLED that our lovely
English-like syntax was working FOR me.  And then an integer was accepted
as a legit date.  I didn't like that at all.  Why can't the engine have "is
a date" or "is a formatted date" as well?

~Roger

On Mon, Oct 16, 2017 at 6:05 AM, hh via use-livecode <
use-livecode@lists.runrev.com> wrote:

> > JLG wrote ...
> > The one exception may be that any _integer_ is considered a date.
> > To get around that we could just check that there are 3 items
> > delimited by slashes before testing for "is a date".
>
> I write "is a /real/ date" into my notes whenever a meeting is a date.
> How do you handle such _real_ cases in your functions?  ;-)
>
>
___
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: is a date

2017-10-16 Thread hh via use-livecode
> JLG wrote ...
> The one exception may be that any _integer_ is considered a date.
> To get around that we could just check that there are 3 items
> delimited by slashes before testing for "is a date".

I write "is a /real/ date" into my notes whenever a meeting is a date.
How do you handle such _real_ cases in your functions?  ;-)

___
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


AW: is a date

2017-10-16 Thread Tiemo Hollmann TB via use-livecode


-Ursprüngliche Nachricht-
Von: use-livecode [mailto:use-livecode-boun...@lists.runrev.com] Im Auftrag
von J. Landman Gay via use-livecode
Gesendet: Sonntag, 15. Oktober 2017 22:38
An: How to use LiveCode <use-livecode@lists.runrev.com>
Cc: J. Landman Gay <jac...@hyperactivesw.com>
Betreff: Re: is a date

>> To get around that we could just check that there are 3 items delimited
by slashes before testing for "is a date".

As long, as you don't handle international dates ...

Tiemo

-- 
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


___
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: is a date

2017-10-15 Thread Jim Lambert via use-livecode
Roger wrote:
> 
> put "11/20/2017" is a date
> returns true
> ----
> put "10" is a date
> returns true
> 
> put "raccoon" is a date
> returns false
> 
> 
> WHY is "10" seen as a date?

Because it is legitimately a date expressed in seconds?

convert 10 to long date
= Wednesday, December 31, 1969

In fact, converting any integer from -57600 to 86400 into a long date will 
result in Wednesday, December 31, 1969

Convert -57601 to long date will result in…Guess what!
Wednesday, December 30, 1969

JimL



___
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: is a date

2017-10-15 Thread Mike Kerner via use-livecode
why not have the engine do it for you - use convert to convert the possible
date to whatever format you're expecting.  If it the answer isn't the same,
then you don't have a date.

On Sun, Oct 15, 2017 at 7:05 PM, J. Landman Gay via use-livecode <
use-livecode@lists.runrev.com> wrote:

> Yeah. Unless you require a year or something, that'd work.
> --
> Jacqueline Landman Gay | jac...@hyperactivesw.com
> HyperActive Software   | http://www.hyperactivesw.com
>
>
>
> On October 15, 2017 4:23:20 PM Alex Tweedly via use-livecode <
> use-livecode@lists.runrev.com> wrote:
>
> Or   x is a date and x is not an integer  ?
>>
>> -- Alex.
>>
>>
>> On 15/10/2017 21:37, J. Landman Gay via use-livecode wrote:
>>
>>> You know, after all the dicussion here, I'm not sure any of the
>>> options are better than "x is a date". The one exception may be that
>>> any integer is considered a date. To get around that we could just
>>> check that there are 3 items delimited by slashes before testing for
>>> "is a date".
>>>
>>>
>>
>> ___
>> 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
>



-- 
On the first day, God created the heavens and the Earth
On the second day, God created the oceans.
On the third day, God put the animals on hold for a few hours,
   and did a little diving.
And God said, "This is good."
___
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: is a date

2017-10-15 Thread J. Landman Gay via use-livecode

Yeah. Unless you require a year or something, that'd work.
--
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software   | http://www.hyperactivesw.com



On October 15, 2017 4:23:20 PM Alex Tweedly via use-livecode 
<use-livecode@lists.runrev.com> wrote:



Or   x is a date and x is not an integer  ?

-- Alex.


On 15/10/2017 21:37, J. Landman Gay via use-livecode wrote:

You know, after all the dicussion here, I'm not sure any of the
options are better than "x is a date". The one exception may be that
any integer is considered a date. To get around that we could just
check that there are 3 items delimited by slashes before testing for
"is a date".




___
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: is a date

2017-10-15 Thread Alex Tweedly via use-livecode

Or   x is a date and x is not an integer  ?

-- Alex.


On 15/10/2017 21:37, J. Landman Gay via use-livecode wrote:
You know, after all the dicussion here, I'm not sure any of the 
options are better than "x is a date". The one exception may be that 
any integer is considered a date. To get around that we could just 
check that there are 3 items delimited by slashes before testing for 
"is a date".





___
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: is a date

2017-10-15 Thread J. Landman Gay via use-livecode
You know, after all the dicussion here, I'm not sure any of the options 
are better than "x is a date". The one exception may be that any integer 
is considered a date. To get around that we could just check that there 
are 3 items delimited by slashes before testing for "is a date".


--
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: is a date

2017-10-15 Thread Yves COPPE via use-livecode
Hi,

Does such a text « 99/99/00 »  exist ?
You can also always say that it is possible that « 15/10/17 » is not a date in 
a certain context 

Now seriously if the function returns a valid date, you can test afterwards the 
result to see if it can be something else than a date.
Now i’m not enough expert in regEx to search something more secure than the 
function I gave previously.
Sorry.

Greetings.

Yves COPPE
yvesco...@mac.com

> Le 15 oct. 2017 à 20:57, Mark Wieder via use-livecode 
> <use-livecode@lists.runrev.com> a écrit :
> 
> On 10/15/2017 11:44 AM, J. Landman Gay via use-livecode wrote:
>> On 10/15/17 5:10 AM, Yves COPPE via use-livecode wrote:
>>> I hope this works for any date format
>> ...
>>> 
>>> if 
>>> matchtext(textToSearch,"(\d{1,2})/(\d{1,2})/(\d{2,4})",theDay,TheMonth,TheYear)
>>>  is true then
>> Yes, it seems to work with any numeric date now.
> 
> It *does* think 99/99/00 is a date, though.
> 
> -- 
> 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: is a date

2017-10-15 Thread J. Landman Gay via use-livecode

On 10/15/17 1:57 PM, Mark Wieder via use-livecode wrote:

On 10/15/2017 11:44 AM, J. Landman Gay via use-livecode wrote:

On 10/15/17 5:10 AM, Yves COPPE via use-livecode wrote:

I hope this works for any date format

...


if 
matchtext(textToSearch,"(\d{1,2})/(\d{1,2})/(\d{2,4})",theDay,TheMonth,TheYear) 
is true then


Yes, it seems to work with any numeric date now.


It *does* think 99/99/00 is a date, though.



Ah. I didn't test that.

--
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: is a date

2017-10-15 Thread Mark Wieder via use-livecode

On 10/15/2017 11:44 AM, J. Landman Gay via use-livecode wrote:

On 10/15/17 5:10 AM, Yves COPPE via use-livecode wrote:

I hope this works for any date format

...


if 
matchtext(textToSearch,"(\d{1,2})/(\d{1,2})/(\d{2,4})",theDay,TheMonth,TheYear) 
is true then


Yes, it seems to work with any numeric date now.


It *does* think 99/99/00 is a date, though.

--
 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: is a date

2017-10-15 Thread J. Landman Gay via use-livecode

On 10/15/17 5:10 AM, Yves COPPE via use-livecode wrote:

I hope this works for any date format

...


if 
matchtext(textToSearch,"(\d{1,2})/(\d{1,2})/(\d{2,4})",theDay,TheMonth,TheYear) 
is true then


Yes, it seems to work with any numeric date now. I also like Ken Ray's 
solution which lets the engine do the conversion and checks for errors, 
since that works with long date formats. The advantage to your solution 
is that it does not recognize a single integer as a date, which could be 
important in some cases. I think there is a use for both functions 
depending on the script context.


--
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: is a date

2017-10-15 Thread Yves COPPE via use-livecode
Hi,

I hope this works for any date format

on mouseUp

ask "Give a date"

if it is empty then exit to top

answer IsDate(it)

end mouseUp



function IsDate textToSearch

local theDay, TheMonth, TheYear

put empty into tresult

if 
matchtext(textToSearch,"(\d{1,2})/(\d{1,2})/(\d{2,4})",theDay,TheMonth,TheYear) 
is true then

put textToSearch into tresult

else

put "Invalid Date" into tresult

end if

return tresult

end IsDate


> Le 14 oct. 2017 à 21:52, J. Landman Gay via use-livecode 
> <use-livecode@lists.runrev.com> a écrit :
> 
> On 10/14/17 2:14 PM, Yves COPPE via use-livecode wrote:
>> Try this
>> function CheckDate pDateToCheck
>> return 
>> matchText(pDateToCheck,"([1-9]|[12][0-9]|3[01])/(0[1-9]|1[0-2])/([0-9][0-9][0-9][0-9])")
>> end CheckDate
> 
> Promising, but fails with dates like "1/1/19".
> 
> -- 
> 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

___
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: is a date

2017-10-14 Thread Michael Doub via use-livecode

What about this from the Master Library from Ken Ray?

function isDate pWhat
   /* isDate Date
   Syntax:
   isDate (pWhat)
   Examples:
   isDate("10/10/2001")
   Description:
   Determines if the container passed to it in  contains a valid 
date.


   Returns true or false.

   Source:
   Ken Ray, sdtlib 1.0b
   isDate */
   convert pWhat to short date
   return not(the result is "invalid date")
end isDate


On 10/14/17 3:52 PM, J. Landman Gay via use-livecode wrote:

On 10/14/17 2:14 PM, Yves COPPE via use-livecode wrote:

Try this

function CheckDate pDateToCheck

return 
matchText(pDateToCheck,"([1-9]|[12][0-9]|3[01])/(0[1-9]|1[0-2])/([0-9][0-9][0-9][0-9])")


end CheckDate


Promising, but fails with dates like "1/1/19".




___
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: is a date

2017-10-14 Thread J. Landman Gay via use-livecode

On 10/14/17 2:14 PM, Yves COPPE via use-livecode wrote:

Try this

function CheckDate pDateToCheck

return 
matchText(pDateToCheck,"([1-9]|[12][0-9]|3[01])/(0[1-9]|1[0-2])/([0-9][0-9][0-9][0-9])")

end CheckDate


Promising, but fails with dates like "1/1/19".

--
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: is a date

2017-10-14 Thread Yves COPPE via use-livecode
Hi,

Try this

function CheckDate pDateToCheck

return 
matchText(pDateToCheck,"([1-9]|[12][0-9]|3[01])/(0[1-9]|1[0-2])/([0-9][0-9][0-9][0-9])")

end CheckDate


answer CheckDate(tDate)

> Le 14 oct. 2017 à 19:27, Roger Eller via use-livecode 
> <use-livecode@lists.runrev.com> a écrit :
> 
> That's what I suspected.  So to build a slightly better trap, I am doing
> this:
> 
> if tDate is a date and length(tDate) > 5 and tDate contains "/" then
>   put "true"
>   else
>   put "false"
> end if
> 
> I am sure there is probably a standard way to catch all possible date
> formats (excluding "the seconds"), but this works for most.
> 
> ~Roger
> 
> 
> On Sat, Oct 14, 2017 at 12:44 PM, Klaus major-k via use-livecode <
> use-livecode@lists.runrev.com> wrote:
> 
>> Hi Roger,
>> 
>>> Am 14.10.2017 um 18:30 schrieb Roger Eller via use-livecode <
>> use-livecode@lists.runrev.com>:
>>> 
>>> put "11/20/2017" is a date
>>> returns true
>>> 
>>> put "10" is a date
>>> returns true
>>> 
>>> put "raccoon" is a date
>>> returns false
>>> 
>>> 
>>> WHY is "10" seen as a date?
>> 
>> looks like the engine is seeing seconds also as a possible valid date.
>> 
>> convert 0 to long date and long time;put it -> Thursday, January 1, 1970
>> 1:00:00 AM
>> 1:00:00 = DST here in germany!
>> 
>> convert 10 to long date and long time;put it -> Thursday, January 1, 1970
>> 1:00:10 AM
>> etc...
>> 
>> And of course:
>> put (the seconds) is a date -> TRUE
>> 
>>> ~Roger
>> 
>> 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
>> 
> ___
> 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: is a date

2017-10-14 Thread Roger Eller via use-livecode
That's what I suspected.  So to build a slightly better trap, I am doing
this:

if tDate is a date and length(tDate) > 5 and tDate contains "/" then
   put "true"
   else
   put "false"
end if

I am sure there is probably a standard way to catch all possible date
formats (excluding "the seconds"), but this works for most.

~Roger


On Sat, Oct 14, 2017 at 12:44 PM, Klaus major-k via use-livecode <
use-livecode@lists.runrev.com> wrote:

> Hi Roger,
>
> > Am 14.10.2017 um 18:30 schrieb Roger Eller via use-livecode <
> use-livecode@lists.runrev.com>:
> >
> > put "11/20/2017" is a date
> > returns true
> > 
> > put "10" is a date
> > returns true
> > 
> > put "raccoon" is a date
> > returns false
> > 
> >
> > WHY is "10" seen as a date?
>
> looks like the engine is seeing seconds also as a possible valid date.
>
> convert 0 to long date and long time;put it -> Thursday, January 1, 1970
> 1:00:00 AM
> 1:00:00 = DST here in germany!
>
> convert 10 to long date and long time;put it -> Thursday, January 1, 1970
> 1:00:10 AM
> etc...
>
> And of course:
> put (the seconds) is a date -> TRUE
>
> > ~Roger
>
> 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
>
___
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   >