date

How can I determine if a string is a Hebrew or Gregorian date?

Hi, I have a string value that contains or a Hebrew date, or a Gregorian date. How can I determine if it's Gregorian or Hebrew in C#? ...

How to parse date from string ?

I want to parse the date from the string where date formate can be any of different format. Now to match date we can use DateTime.TryParseExact and we can define format as we needed and date will be matched for any different format. string[] formats = {"MMM dd yyyy"}; DateTime dateValue; string dateString = "Ma...

manage date fields when are int in the db

Hi in my db there is a field "date_start" type integer. This is the part of form for this field <div class="editor-label"> <%: Html.LabelFor(model => model.date_start) %> </div> <div class="editor-field"> <%: Html.TextBoxFor(model => model.date_start, new { @class = "calendar" })%...

How do use a mod_rewrite to eliminate the "/%year%/ from WordPress URL?

How do use a mod_rewrite to eliminate the "/%year%/ from WordPress URL? Thanks in advance! ...

Integrate calendar into Oracle forms app

Hi guys :) i want to integrate a ready made CALENDAR on my oracle forms application whether it's a java applet or other available option ; i want the end user to be able to invoke this CALENDAR whenever he pressed a button so that he can choose a specific date to be entered in a display item . ...

Python date string to date object

How do I convert a string to a date object in python? The string would be: "24052010" (corresponding to the format: "%d%m%Y") I don't want a datetime.datetime object, but rather a datetime.date I suspect that I'm asking a trivial question but I searched and couldn't find it neither on stackoverflow nor on google. ...

PHP 'Years' array

I am trying to create an array for years which i will use in the DOB year piece of a form I am building. Currently, I know there are two ways to handle the issue but I don't really care for either: 1) Range: I know I can create a year array using the following <?php $year = range(1910,date("Y")); $_SESSION['years_arr'] = $y...

JSON Date coming through as Today's date?

I'm trying to convert a JSON date to a dd/mm/yyyy format, which I'm managing to do semi-successfully. The problem I'm encountering is that the date from the record in the DB is for example, 2009-06-29 which is returning the usual JSON /Date(1246230000000)/, however, when I try and turn it into the previously mention dd/mm/yyyy format, i...

Check if date is allowed weekday in php?

Hello! I'm stuck with a problem how to check if a specific date is within allowed weekdays array in php. For example, function dateIsAllowedWeekday($_date,$_allowed) { if ((isDate($_date)) && (($_allowed!="null") && ($_allowed!=null))){ $allowed_weekdays=json_decode($_allowed); $weekdays=array(); foreach($allowe...

Date Comparison using Java

I have two dates: toDate (user input in MM/dd/yyyy format) currentDate (obtained by new Date()) I need to compare the currentDate with toDate. I have to display a report only when the toDate is equal to or more than currentDate. How can I do that? ...

PHP DateTime Regex

Hey, long story short I have inherited some terrible code. As a result a string comparison is buggy when comparing dates due to the format of the date. I am trying to convert the date to a valid DateFormat syntax so I can run a proper comparison. These are some samples of the current format: 12/01/10 at 8:00PM 12/31/10 at 12:00PM 12/...

JavaScript help - compare two dates in (dd/MMM/yyyy) format

I am trying to compare two textbox values on an aspx form. Both the values represent dates. They are formatted like "dd/MMM/yyyy". How can I compare them in JavaScript to see if they are not equal and which one is greater etc.? Does JavaScript have a date constructor for strings like this? Any tips would be appreciated. ...

Can the current date be inserted into output through XSLT v1.0

I have an incoming data stream that is being converted with XSLT v1.0 that incoming data does not contain any date information. what i would like, is a nice way of getting the current date to become part of the resulting output stream. I am aware of the 2.0 current-date() type functions - unfortunately those are not available to this en...

JavaScript Add hh:mm + hh:mm to get new hh:mm

I have two javascript vars (they're coming from text boxes, so they're probably being evaluated as strings) in this format: 02:30 and 4:45 they represent hours and minutes. I want to add them together to get 07:15 but I can't figure it out. ...

Is there a way in javascript to create a date object using year & ISO week number?

I am trying to create a google annotated timeline viz. For that I need to input the date of the event. The only information I have is the year & the ISO week number for the event. Is there a way in Javascript to create a Date object using just the year & week number? I googled it but did not come across any feasible solution. Thanks fo...

How to distinguish date at midnight from date w/o time in Oracle?

I would like to distinguish date at midnight (i.e. '12/05/2010 00:00:00') from date without time specified (i.e. '12/05/2010'). This value is provided by user, sometimes it is only date which is important, sometimes it is date and time and later the application is expected to show the time only when it was explicitly provided. So for the...

In PHP how do a translate a date to numerical format not knowing the format of the string beforehand?

Examples of the translations I need to do: $stringDate = "November 2009"; $output = "11/09"; $stringDate = "October 1 2010"; $output = "10/01/2010"; $stringDate = "January 2010"; $output = "01/10"; $stringDate = "January 9 2010"; $output = "01/09/2010"; Note that I do not know which format the $stringDate will be in and the lack of ...

hp-ux how to get 2 hours ago bash datetime

we are using hp-ux servers we need to get 2 hours ago datetime value in bash shell script ? how can i do that any experiences ? ...

[bash] files indexed by production date

Each day an application creates a file called file_YYYYMMDD.csv where YYYYMMDD is the production date. But sometimes the generation fails and no files are generated for a couple of days. I'd like an easy way in a bash or sh script to find the filename of the most recent file, which has been produced before a given reference date. Typic...

RFC822 Timezone Parsing in Java

Hi, I have a JS date that is being converted by Dojo into RFC822 format. The function call - dojo.date.toRfc3339(jsDate), generates the following date - 2007-02-26T20:15:00+02:00. I have an application that uses a Java date SimpleDateFormat to parse in the dates generated above. I am having problems parsing this date format due to th...