date

In PHP, if a variable holds a datetime, what does operator-- do?

My background is C, Java, C#, and VB.NET, but I have to work on some basic PHP stuff. I've gotten to this line of code: if($flag) $event_end--; What exactly is being decremented? The raw ticks? $flag (I think) represents if the event is an all-day event, where the start would be 7/1/2010 and end would be 7/2/2010. Does the -- esse...

Fullcalendar: gotoDate issue with current date.

Hi! I'm trying to store fullcalendar selected date and restore it after postback. I get this date from Session via ajax and then use this code: $('#calendar').fullCalendar('gotoDate', selectedDate); It works fine if selectedDate is not in default view - all events are shown after load. But if selected date is in default view - I get e...

Excel VBA alternative way of sorting by date

Hi, I'm currently working on a document which has about 25 columns, each headed by a date. Now I have to sort these columns by date. However, the sorting should not start with January and run until December. In my document, the sorting should start with September, and run until June (July and August can be omitted, as my document relate...

Problem with negative date on iPad and not on simulator

I'm working on an history application so I need to cope with date before and after JC. I'm trying to parse a string with the form "01/01/-200" but it returns a null date while it's working with "01/01/200". Here is my code : NSDateFormatter* dateFormatter = [[[NSDateFormatter alloc]init] autorelease]; [dateFormatter setDateFormat:@"dd...

custom dateField component with comboBox and clear button inside the dropdown calender in flex3

hi, i inserted a dateField component.on clicking it displays calender, i would like to add 2 comboboxes, i shows hours(0 to 23) other for minutes (0 to 59) to calender so tht the user can select the time along with the date and that wil be displayed in the text input as date and Time. one more thing i would like to add is clear button...

Finding date by subtracting X number of days from a particular date in C

I am looking for a sample in C to get the result date when input of number of days and a date is given . inputs are date_t end_date, int days=7 is given I should get a date_t start_date which is 7 days before than end_date value ...

PHP calculate person's current age

I have birth dates on my site in format 12.01.1980. $person_date (string) = Day.Month.Year Want to add an oldness of the person. Like "Currently 30 years" (2010 - 1980 = 30 years). But makin the function just on years can't give the perfect result: If person birth date is 12.12.1980 and current date is 01.01.2010 the person doesn't ...

Shell script to get difference in two dates

If there are dates as 2010-06-01 and another as 2010-05-15 Using shell script or date command how to get the number of days between the two dates Thanks.. ...

Holidays - is there a java implementation?

I'd like to know if there is a jar-file out there that could do the following: DateMidnight dateInQuestion = new DateMidnight(12,12,2000); DateChecker.isNationalHoliday(dateInQuestion, Locale.ITALY); If there isn't, why? Surely there are lots of properly based rules for the holidays in 99% of the times. Right now we're mainting a tab...

Advanced MySQl query to fetch date specific records within the same table

Hi, I need to findout a better and quick way to query MySQL table to get specific data for each day in a given date range, where the table has two date columns specifying start and end date. Table example: Promotions columns: ID startDate EndDate Discount CategoryID ======================================================...

Parse any date in Java

I know this question is asked quite a bit, and obviously you can't parse any arbitrary date. However, I find that the python-dateutil library is able to parse every date I throw at it, all while requiring absolutely zero effort in figuring out a date format string. Joda time is always sold as being a great Java date parser, but it stil...

iphone uitableview grouped by date implementation

Hey guys, I'm very new to iphone development, so you'll have to forgive me. So currently I have a table that displays messages, but I'd like to group the messages by date, e.g. Tuesday 4/5/98 //header message 1 message 2 message 3 Wednesday 4/6/98 message 1 etc. So right now, it's just one long NSMutableArray oldArr (sorte...

SQL date format bind variable

Can anyone please tell me what is wrong with this SQL query. "select USERNAME, DATECREATED, CREDTYPE, USAGETYPE, OPERATIONID, TXNID, CALLERID from arwfissuanceauditlog where OPERATIONID in (2104,2107) and datecreated >= 'to_date('2010/06/21', 'yyyy/MM/dd HH24:MI:SS')' and datecreated < 'to_date('2010/08/03', 'yyyy/MM/dd HH24:MI:SS')'" ...

objc convert unix date

Hi guys, I got a small problem . I have this date format from .net json output: Date(1280471989140); when I try to convert using + (NSDate*)dateFromUnixDate:(double)unixdate { NSTimeInterval unixDate = unixdate; return [NSDate dateWithTimeIntervalSince1970:unixDate];} but I got the wrong date back,why? thanks ...

Is it possible for a regex to know whether a date is a weekend or not?

Using javascript I need to validate a form field containing a date in the format: 21/04/2010. The date must be a weekday. Is it possible to create a regular expression for this or is there another, better way to do it? ...

How to Remove Date From Posts

I have the date in all of my posts and I'd like to remove them, both from the main page and from individual post pages. My site is SweatingTheBigStuff.com. I think this is the code to look at. It's in the index.php file and there is something similar in the single.php file. <?php ob_start(); ?> <?php $icons = array(); ?> <?php if (!is_...

How do you convert an XSLT 2.0 date duration to a string?

I am using some code to subtract one date from another using XSLT 2.0: <xsl:template match="moveInDate"> <xsl:value-of select="current-date() - xs:date(.)"/> </xsl:template> This works, however it leaves me with an answer of P2243D, which I assume corresponds to a "Period of 2243 Days" (which is correct in terms of the math). Sin...

Java Date format

I have a spring web application that runs in Tomcat. I must set the date and number format for my application to a special format. Can I set the format in any descriptor to the special in my application or I can set the all system format only? ...

Expiring date today in Java

I need to check if given date is after today 23:59:59, how can I create date object that is today 23:59:59? ...

mysql timestamp convertion

What is the correct way to convert from mysql timestamp (YYYY-MM-DD HH:MM:SS) to my own chosen format, something like "August 5, 2010"? iow how can I make the mysql timestamp php date() compatible? ...