search for: strtotime

Displaying 15 results from an estimated 15 matches for "strtotime".

2006 May 11
4
string to date/time?
Hey All, Anyone know of a library for parsing "human" dates, like "this friday" or "2 days ago"? I used to use strtotime in php, but starting from here; http://wiki.rubyonrails.com/rails/pages/PhpStrtotime and doing lots of googling, I haven''t been able to find anything similar for ruby. I know of javascript solutions to this, but I''d need to do this processing on the server. Thanks! - Isaac
2006 Jan 16
3
String date parsing
Does anyone know if a Ruby package has been written to handle functionality similar to php''s strtotime(). I''m looking for something that can parse almost any string (such as "1 day ago", "+1 week", "last tuesday") into a timestamp. I''ve played with ParseDate, but it doesn''t seem to do what I need. Any suggestions? Derek
2003 Mar 09
0
ogg123 --end 1:59 patch.ogg
...{"end", required_argument, 0, 'K'}, {"delay", required_argument, 0, 'l'}, {"device-option", required_argument, 0, 'o'}, {"prebuffer", required_argument, 0, 'p'}, @@ -50,6 +51,17 @@ {0, 0, 0, 0} }; +double strtotime(char *s) +{ + double time; + + time = strtod(s, &s); + + while (*s == ':') + time = 60 * time + strtod(s + 1, &s); + + return time; +} int parse_cmdline_options (int argc, char **argv, ogg123_options_t *ogg123_opts, @@ -63,7 +75,7 @@ audio_device_t *current; int ret...
2020 Jul 25
0
[klibc:master] tests: Add a trivial test for sysconf()
...file changed, 1 insertion(+) diff --git a/usr/klibc/tests/Kbuild b/usr/klibc/tests/Kbuild index c7ca531f..00b701fc 100644 --- a/usr/klibc/tests/Kbuild +++ b/usr/klibc/tests/Kbuild @@ -45,6 +45,7 @@ stdio.shared-y := stdio.o strlcpycat.shared-y := strlcpycat.o strtoimax.shared-y := strtoimax.o strtotime.shared-y := strtotime.o +sysconf.shared-y := sysconf.o testrand48.shared-y := testrand48.o testvsnp.shared-y := testvsnp.o vfork.shared-y := vfork.o
2020 Jul 25
0
[klibc:master] tests: Add a trivial test for sysconf()
...les changed, 15 insertions(+) diff --git a/usr/klibc/tests/Kbuild b/usr/klibc/tests/Kbuild index c7ca531f..00b701fc 100644 --- a/usr/klibc/tests/Kbuild +++ b/usr/klibc/tests/Kbuild @@ -45,6 +45,7 @@ stdio.shared-y := stdio.o strlcpycat.shared-y := strlcpycat.o strtoimax.shared-y := strtoimax.o strtotime.shared-y := strtotime.o +sysconf.shared-y := sysconf.o testrand48.shared-y := testrand48.o testvsnp.shared-y := testvsnp.o vfork.shared-y := vfork.o diff --git a/usr/klibc/tests/sysconf.c b/usr/klibc/tests/sysconf.c new file mode 100644 index 00000000..e32c1383 --- /dev/null +++ b/usr/klibc/tes...
2005 Aug 07
0
kbuild: add klibc/tests
...rtsig.shared-y := rtsig.o +setenvtest.shared-y := setenvtest.o +setjmptest.shared-y := setjmptest.o +sigint.shared-y := sigint.o +stat.shared-y := stat.o +statfs.shared-y := statfs.o +strlcpycat.shared-y := strlcpycat.o +strtoimax.shared-y := strtoimax.o +strtotime.shared-y := strtotime.o +testrand48.shared-y := testrand48.o +testvsnp.shared-y := testvsnp.o + +# Cleaning +clean-files := $(static-y) $(shared-y) $(test-files:.c=.o)
2011 May 23
1
More relevance for recent documents
...search query using AND_MAYBE, which should use relevance from both subqueries, but it didnt add any benefit to the resalts which are match by this subquery $query = new XapianQuery(XapianQuery::OP_AND_MAYBE, $query, new XapianQuery(XapianQuery::OP_VALUE_GE, self::DATE, date('Ymd000000', strtotime("- 1 year")))); Is there some way how to give more relevance to the recent documents? Would be solution possible in PHP where is still some problem with subclasing Xapian classes? I will be glad for any suggestions Thank you for your time Sincerely Pl?ek V?t?zslav -- S pozdravem V?...
2020 Mar 28
0
[klibc:update-dash] Implement stpcpy() and stpncpy()
...100644 --- a/usr/klibc/tests/Kbuild +++ b/usr/klibc/tests/Kbuild @@ -42,6 +42,7 @@ sscanf.shared-y := sscanf.o stat.shared-y := stat.o statfs.shared-y := statfs.o stdio.shared-y := stdio.o +stpcpy.shared-y := stpcpy.o strlcpycat.shared-y := strlcpycat.o strtoimax.shared-y := strtoimax.o strtotime.shared-y := strtotime.o diff --git a/usr/klibc/tests/stpcpy.c b/usr/klibc/tests/stpcpy.c new file mode 100644 index 00000000..4340f61a --- /dev/null +++ b/usr/klibc/tests/stpcpy.c @@ -0,0 +1,75 @@ +#include <stdio.h> +#include <stddef.h> +#include <stdlib.h> +#include <string.h...
2006 Jun 26
0
[klibc 38/43] Simple test suite for klibc
...12 usr/klibc/tests/setenvtest.c | 39 usr/klibc/tests/setjmptest.c | 38 usr/klibc/tests/sigint.c | 53 + usr/klibc/tests/stat.c | 63 + usr/klibc/tests/statfs.c | 42 usr/klibc/tests/strlcpycat.c | 111 + usr/klibc/tests/strtoimax.c | 23 usr/klibc/tests/strtotime.c | 25 usr/klibc/tests/testrand48.c | 19 usr/klibc/tests/testvsnp.c | 119 + usr/klibc/tests/vfork.c | 45 27 files changed, 5152 insertions(+), 0 deletions(-) Patch suppressed due to size (64 K), available at: http://www.kernel.org/pub/linux/kernel/people/hpa/klibc-patchse...
2005 Aug 04
0
Rails Date/Time Validation and Parsing
...nd Rails''ey things. Dates are an annoyance no matter what the language, but in keeping with DRY, I''m looking for something like: validates_date :between => 4/8/2002..5/29/2009 Or something like that. Additionally, it seems someone somewhere must have created a wrapper around strtotime. What I''m looking for is a way to parse nearly any valid date entry into a Date type. Thanks, Steve Ross
2003 Feb 28
2
ogg123 -k 1:59 patch.ogg # minutes and seconds
Hi I have helped a user with a little patch for ogg123. He uses ogg123 for very big files, often more than an hour (blind books). When he breaks the book and later on want to go back to the same chapter, it is a little troublesome to calculate the seconds. Minutes is much more convenient as it is what is written on the screen. I guess my patch is a little buggy and would like to improve it
2007 Apr 27
0
[ANN:] new package xlsReadWrite*Pro*: announce + update.
...= NA, colClasses = NA, dateTimeAs = "oledatetime", keep = NA, append = FALSE ) - xls.info, xls.sheet, xls.range, xls.image, xls.new, xls.open, xls.save, xls.cancel, xls.close - languagesAndLCID, dateTimeToStr, dateTimeToIsoStr, strToDate, strToDateTime, strToTime, isoStrToDateTime, shortDateFormat, longTimeFormat, encodeDateTime, encodeDate, encodeTime, decodeDateTime - dateOf, timeOf, isInLeapYear, isPM, weeksInYear, daysInYear, daysInMonth, now, today, isToday, yesterday, tomorrow, yearOf, monthOf, weekOf, dayOf, hourOf, minuteOf, secondOf, milliSecond...
2012 Dec 27
4
Where is timezone string stored?
I am having problems with RoundCube: 'Your session is invalid or expired' So I went looking for logs and in /var/log/roundcube/errors I find LOTS of warnings about problems with my timezone. Kind of a challenge to copy the log entries over here (will do if needed). Anyway, for right now I am looking as to where my 'Detroit American/New_York' (what I am seeing in Gnomes
2004 Aug 06
2
XML statistics on remote server
what i did in this situation was dump the stats/status file to the local server through a lynx --dump call from php .. and then i also update a sql table to reflect the changes so i can poll that instead .. a. <p>On Thu, 26 Feb 2004, MacSym wrote: > > Hi everybody, > > I am wondering if it is possible to generate the XML/XSL files on a remote > server (status.xsl,
2006 Jun 28
35
[klibc 00/31] klibc as a historyless patchset (updated and reorganized)
I have updated the klibc patchset based on feedback received. In particular, the patchset has been reorganized so as not to break git-bisect. Additionally, this updates the patch base to 2.6.17-git12 (d38b69689c349f35502b92e20dafb30c62d49d63) and klibc 1.4.8; the main difference on the klibc side is removal of obsolete code. This is also available as a git tree at: