year

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

How can I bind multiple Jquery UI Slider with "year" Select?

Hi, I'm trying to render sliders instead of select components. Each page has several select components marked with class='jqselect' and all of them will have decreasing year values (some years may be missing). Eg. a select may have values [2010, 2009, 2006, 2005, 2004]. I have tried binding it both following the examples in the jQuery...

SQL Scalar UDF to get number of days in Year

I writing code to determine how many days in a year. I am trying to keep it really simple. I found code that I think is very clean to determine a leap year. I am passing the inputted date using DATEPART(Y,@Year) to the leap year program and some how am not getting the correct results so I has to be in my SQL code to process the input da...

PHP: How to get age in php from day, month, year ?

I have 3 variables $day, $month, $year each of them have the values what the users given to them. I want to get his real Age too from these 3 variables. For example the user enters this date for his birthdate in this format day,month,year: 04, 07, 1990 -> Now his age is 19 02, 07, 1990 -> Now his age is 20 I want to have i...

get the year out of timestamp sql

Dear Stackoverflow users and contributers, I have a problem extracting the year out of a mysql timestamp field. I managed to get it work with a datetime field using this method: SELECT id FROM TABLE WHERE YEAR(creation_date) = 2010 CREATE TABLE IF NOT EXISTS `pub_media` ( `id` int(11) NOT NULL AUTO_INCREMENT, `parent_id` int(11) D...

LaTeX - Insert the current year (like \today)?

Using the LaTeX command \today, I can insert the current date. Is there any way to insert the current year with a simple command? All I want is the simple 4 digit year that shows up in \today ...

help needed for a project on HDD manager!!

i am thinking about making my final year project on something like a hard drive manager.the project is about developing a utility that will help you manage your hard drive. It will roughly have the following features: 1. the utility will perform defragmentation 2. it will handle duplicate files and help in removing them when needed 3. it...

Ruby: identify four-digit numbers and cut a text

so i'm dealing with a text (in string) containing many year numbers (four-digit), i'm trying to divide the text into segments each of which begins and ends with a year number (doesn't matter if the year number is included in the segment). basically year numbers just act like a signal for the code to 'cut'. any ideas how i can do that? h...

Best approach: transfer daily values from one year to another

I will try to explain what I want to accomplish. I am looking for an algorithm or approach, not the actual implementation in my specific system. I have a table with actuals (incoming customer requests) on a daily basis. These actuals need to be "copied" into the next year, where they will be used as a basis for planning the amount of ...

wordpress - function to display posts from a category group by year

I work with a function (from a plugin) to display post from a category category group by year, but I can´t filter to category. I try add " $posts = query_posts($query_string . '&cat=3');" but I got all categories. How can I do it? The function: function favrik_recent_posts($args = '') { global $wp_locale, $wpdb; // params fun parse_st...

WordPress posts sorted by category and year

I've been on a long google search trying to find the solution to this... I am creating a cv manager theme using a WordPress install to control content. I have managed to organise all WP posts in categories but would also like to list those posts in year groupings. Currently I have this: <?php // Categories $cvm_cat_args = array...

What is the nicest way to select the current week in MySQL

At the moment I have something like this... SELECT SUM(a.PaidSingle) AS PaidSingle, DATE_FORMAT(a.TimeIn, '%a') AS weekDay FROM Attendance AS a JOIN MemberDetail AS m ON m.id = a.MemberID WHERE m.CardNumber = '$cardNo' AND WEEK(a.TimeIn, 0) = WEEK(NOW(),0) GROUP BY weekDay ORDER BY a.TimeIn But it dawned on me after writing i...

Customising the DatePicker Dialog Android

I am using a DatePicker in a Dialog box to allow the user to chose a date. But I just want them to chose a month and a day. Is there any way I can make the year not show up? ...

PHP iterate days of month given month and year

Hello! How can I print (echo) the days of an unknown month if month and year are parameters? Thank you. ...