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:

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

2021-03-15 Thread Sean Cole (Pi) via use-livecode
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 power

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

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

2021-03-15 Thread Mark Wieder via use-livecode
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

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 20

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

2021-03-14 Thread Phil Davis via use-livecode
ant 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 place

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

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

Re: sorting lines by date

2020-07-11 Thread Curry Kenworthy via use-livecode
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 t

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 s

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

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 >

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 >

Re: sorting lines by date

2020-07-10 Thread Tom Glod via use-livecode
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:/

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

Re: system date

2020-05-04 Thread matthias rebbe via use-livecode
dvanced’ 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

Re: system date

2020-05-04 Thread Jacques Hausser via use-livecode
hange 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 > > &g

Re: system date

2020-05-04 Thread Martin Koob via use-livecode
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

Re: system date

2020-05-04 Thread Martin Koob 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: >>> >>&

Re: system date

2020-05-04 Thread Jacques Hausser via use-livecode
ecode >> : >> >> 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

Re: system date

2020-05-04 Thread matthias rebbe via use-livecode
ieb 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 > c

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

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

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

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:

Re: Date and time

2019-06-06 Thread dunbarxx via use-livecode
t 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

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 itemDe

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 <

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

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

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 fo

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

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

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

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

Re: setting file created date in livecode from script

2019-04-15 Thread Keith Martin via use-livecode
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

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

Re: setting file created date in livecode from script

2019-04-14 Thread Stephen Barncard via use-livecode
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

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 the

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

Re: setting file created date in livecode from script

2019-04-14 Thread Richard Gaskin via use-livecode
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

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,

Re: setting file created date in livecode from script

2019-04-14 Thread Stephen Barncard via use-livecode
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 a

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

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

2019-02-14 Thread Matthias Rebbe via use-livecode
://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 succes

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

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

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

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.

Re: Internet Date Service test

2018-09-14 Thread Peter Bogdanoff via use-livecode
/> 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",&quo

Re: Internet Date Service test

2018-09-14 Thread Stephen Barncard via use-livecode
d - 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...@

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

Re: Internet Date Service test

2018-09-14 Thread Stephen Barncard via use-livecode
ing 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 thin

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 inde

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 wr

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 t

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

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

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

Re: Internet Date Service test

2018-09-14 Thread Stephen Barncard via use-livecode
ocs/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

Internet Date Service test

2018-09-14 Thread Peter Bogdanoff via use-livecode
"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 writ

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 ~

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

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

2018-09-02 Thread Mark Waddingham via use-livecode
n 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

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 us

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

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

Re: date libraries/routines for LCG

2018-05-09 Thread ELS prothero via use-livecode
, 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 A

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

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

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

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

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

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

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

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 &

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 sq

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

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

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,

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

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

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

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 e

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 meet

AW: is a date

2017-10-16 Thread Tiemo Hollmann TB via use-livecode
ivesw.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...@hyperactiv

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

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:

Re: is a date

2017-10-15 Thread J. Landman Gay via use-livecode
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 dat

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 da

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

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

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})&qu

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 wor

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

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})/(\

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

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 |

Re: is a date

2017-10-14 Thread Yves COPPE via use-livecode
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

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 dat

  1   2   3   4   5   >