date

Date Popup module - I want a Time Popup as well

I've got a field in a form (custom content type built using CCK) configured as a date and time. I have the Date Popup module installed. My field shows up as two fields, one for the date and one for the time. When users click in the date field, the JQuery calendar pops up and all is fine. But nothing happens when they click in the time ...

How to calculate last business day of the month in Korn Shell?

I've seen this question answered in other languages but not the Korn Shell. I need to prevent a script from being run on the last business day of the month (we can assume M-F are business days, ignore holidays). ...

Dates before Jan. 01 1970?

I'm trying to write a javascript function that calculates the time since Oct 11th, 1910 so I can throw it into a timer for a project I'm working on. I get that javascript's milliseconds works from epoc, but I don't and can't find a way to get the milliseconds since a date earlier than 01.01.1970 Does anyone have any loose code that can ...

What's the correct direction of a date embedded in arabic text?

The question is quiet simple: I've got an arabic text with an US formated Date in it. What is the correct display order of this date? Is it(for instance) 01/10/2009 or 2009/10/1? The bidi algorithm recognizes the numbers an slashes as neutral and orders them in the same direction like the surrounding text. So the date should be backward...

How to convert DateTime string into a Format string

With .NET, I have "Thursday, April 10, 2008 1:30:00 PM" and I want "dddd, dd MMMM, yyyy h:m:s t", "6:09:01 PM" and want ""hh:mm:ss tt", "Fri 29 Aug" and want "ddd d MMM", and so on. It seems I should be able to use DateTimeFormatInfo in some way. I figured I can format the date with each pattern returned by GetAllDateTimePatterns, and ...

Should I use Calendar.compareTo() to compare dates?

Is it a valid way of comparing dates: Calendar someCalendar1 = Calendar.getInstance(); // current date/time someCalendar1.add(Calendar.DATE, -14); Calendar someCalendar2 = Calendar.getInstance(); someCalendar2.setTime(someDate); // someDate is in the format of MM/dd/yyyy if(someCalendar2.compareTo(someCalendar1) < 0){ ...Code... ...

Cleanest and most Pythonic way to get tomorrow's date?

What is the cleanest and most Pythonic way to get tomorrow's date? There must be a better way than to add one to the day, handle days at the end of the month, etc. ...

Month since a special date (in decimal)

I would like to have a function that could display how many months it's been since a special date – with decimals if possible. Anyone have an idea on how to make it? (In PHP) I ended up doing the following: $var = ((mktime(0,0,0,8,3,2009) - mktime(0,0,0,9,3,2009))/86400/30.4368499); Your answers were helpful. James Goodwins was the on...

MYSQL - Date query and display(PHP) question

I am currently trying to write a little program to track time-off requests for employees. I'm fairly new to MYSQL and PHP, so it's a learning project for me as well. I've run into this problem which I do not seem to be able to figure out. I want to display time off requests for a given week (Mon-Fri). I've got the requests in a table 'r...

implicit conversion of Object to XML in flex 3

when I send an object through an HTTPService to an XML api run by a Rest ruby on rails server.. how does it get converted to XML? I mean, it just works fine for strings and numbers, but for example Date type conversion causes an "unprocessable entity" error on rails log.. Any Idea? ...

Java date function which is not deprecated

I simply need to print the date of the day on the console in this format: Day.Month.Year. Example: 03.10.09 Code: GregorianCalendar c = new GregorianCalendar(); Date s = c.getTime(); System.out.println(s); The console prints: Sat Oct 03 13:33:36 CEST 2009 I could do it with a case statement, but I am sure there is something more...

How do I find the time interval between two date attributes in an Entity in a Cocoa Application using Core Data?

I have a date attribute "off" which is represented with Date Formatter in a tableView as HH:MM. I have a date attribute "on" that is also represented with a Date Formatter in a TableView. I'm trying to output the time interval (HH:MM)between these two attributes. The output would be flight time. ...

How to grab items from a DB by date

This is my script: $spending_period = time() - (30 * 24 * 60 * 60); $spending_period = date('Y-m-d', $spending_period); $monthly_income_query="SELECT amount FROM budget_items WHERE (date_code >= '$spending_period') && (type=='Income') ORDER BY date_code DESC"; $monthly_income_result=mysql_query($monthly_income_query); while($monthly_inc...

java.util.Date is using TimeZone?

I have 2 different computers, each with different TimeZone. In one computer im printing System.currentTimeMillis(), and then prints the following command in both computers: System.out.println(new Date(123456)); --> 123456 stands for the number came in the currentTimeMillis in computer #1. The second print (though typed hardcoded) resul...

java inserting date into database

hi, can someone please tell me the elegant way of inserting a java date instance into database? presently, i am using IBATIS with Spring MVC . i have defined a java.util.date property in the command bean and property editor in the controller for Date conversion, however i am unable to insert java.util.date property in DB . should i c...

control panel date&time is considered while using "new date()" javascript function.

Hi, I am getting a client date in javscript function using "new date()" object. But this object is considering the properties set for Date&Time control in the control panel of the system. For example, If I check the check box of Date&Time control of the system (control panel) "Automatically adjust clock for daylight saving changes", t...

Sum time between dates in MySQL

I have a MySQL table looking like this. It's basically a time sheet for tasks. id | task | user | start | stop | running ------+--------+--------+-----------------------+-----------------------+----------- 1 | 12 | 2 | 2009-10-01 10:05:00 | 2009-10-01 14:23:00 | 0 1 | 13 ...

Joda Time bug or my mistake? (Java Joda Time dates as strings parsing)

Hi, so I was having a problem parsing a date, using the JodaTime chronology IslamicChronology so wrote a small example to demonstrate my problem. Here's the code: import org.joda.time.Chronology; import org.joda.time.format.DateTimeFormatter; import org.joda.time.format.DateTimeFormat; import org.joda.time.chrono.IslamicChronology; im...

PHP - Format date from database?

When I pull the date out of the db, it comes back like this: 2009-10-14T19:00:00 I want to format it in two different ways... The first: F d, Y The second h:m (12 hour format) Everything I try returns December 1969... Help?! I feel so confused... ...

PHP end date calculation

Hello , i have a situation where i know the start date and the durration of an event in days , how can i calculate the end date ? i found topics on how to calculate the duration between two dates but nothing in my case Thanks in advance . ...