Featured
-
How Regression Testing Detects Integral Errors In Business Processes
Humans are forever changing and evolving and so to
by kristina.rigina -
Get Display Banner Advertising Opportunity on FindNerd Platform
“Do you have a product or service that nee
by manoj.rawat -
Android O Released with Top 7 New Features for App Developers
Android was founded by Andy Rubin, Rich Miner, Nic
by sudhanshu.tripathi -
Top 5 Features That Make Laravel the Best PHP Framework for Development
Laravel is a free open source Web Framework of PHP
by abhishek.tiwari.458 -
Objective C or Swift - Which Technology to Learn for iOS Development?
Swift programming language is completely based on
by siddharth.sindhi
Tags
How to Get Hijri Equivalent Date of Gregorian Date?
Hello Reader's!
In this blog, we will see how to get conversion of Gregorian date into Hirji (Islamic date).
Before you start the getting the equivalent you must be knowing that Hijri Calendar is about 400 year lags behind our curr...
Convert NSDate from local timezone to UTC and vice versa in Swift 3.0
1. To convert UTC(Coordinated Universal Time) to Local timezone
func convertToLocalDateFromUTCDate(dateStr : String) -> String {
let formatter = DateFormatter()
formatter.dateFormat = "yyyy-MM-dd HH:mm:ss Z"
let...
How to convert Gregorian(English) into Hirji date(Arabic)
Hello Reader's, If you are developing an Arabic website where you want to convert English date into Arabic Date then this blog is very helpful to you.
In Hijri date the number symbols are convert into islamic language.
So first we...
String was not recognized as a valid DateTime
Hi,
Many a times we encounter this issue where passing the correct date also ends up on this error, which makes it a bit complex and mind boggling.The main reason behind the error is the string passed as a date is not in the format the system ...
Important Methods of Date in Ruby
We often stuck, how to manipulate Date in our rails Application.
We have two Date objects in Ruby
Time.now() // This will give Today's date
#=> 2016-05-17 17:02:28 +0530
Date.new() // This will need some arguments to pa...
Possible days in a date range using Javascript
Possible days in Date Range using Javascript
Hi friends,
In some cases we try to build a logic where for a case where we need to find all the possible days that are possible inside a date range for any use case like scheduling a meetin...
Formatting date in different format in java
Formatting Date in java:
There is a predefined format for dealing with dates in java , but suppose if you want the date in some other format other than the default one then you can use the SimpleDateFormat class of the java.text ...
Printing current Date in Java
Date Class in java:
There is a Date class in java under java.util package which can be used to print the current dates. There can be various ways to print the current date. Lets see with the help of example:
import java.util.Date;
...
Add Suffix To Date
Add Suffix To Date
Here is a very simple example of adding suffix to the date in iOS .With the help of example given below you can easily add a suffix to the date selected by the NS...
How to get year from a date in Java?
To get only year from a date you can use the below code. You can pass any date that you wan to change, I'm getting year from the date in the below example:
/**
* Get year from Date
*
* @param createDate
*...
How to get full date with time in Java?
To get the full date with time you can use the below code. You can pass any date that you wan to change, I'm getting date in full date format in the below example:
/**
* Get full month day year format from Da...
Managing Date and Time in ActionScript
Managing Date and Time in ActionScript is done using the DATE class. The Date class in actionscript provides you the information of date as well as the time. The Date function has a great importance in actionscript. For example if we want to calc...
How to extract today's date & time in Rails
If you want to extract only the date, we can use the strftime method of Time/Date class, as
2.1.5 :055 > DateTime.now.strftime('%d/%m/%Y')
=> "12/30/2015"
(Here d is used to display date, m displays month and Y display the ye...
How to check a particular date is within past 24 hours or not?
Sometimes we need to check whether a date is within past 24 hours or not. Generally we implement this kind of functionality when we create an AuthToken or a code that we want to to be valid for some time duration.
Example: In the below example...
Compare two Date object in Java
Sometime we need two compare two dates like which Date object's time coming first or last.
Here is the code to compare two dates.
Date date1;
Date date2;
if(date1.before(date2)){
System.out.println("Date 1 is before date ...
How to add minutes in a given date using Javascript
Hello Reader's, If you need to add some minutes to a given date, Then by using Javascript you can use as follows:-
var d1 = new Date (),
d2 = new Date ( d1 );
d2.setMinutes ( d1.getMinutes() + 50 ); //adding 50 min to the date
alert ( d...
How to get current date time with you region using PHP
If you are using PHP and want to get the current date time with respect to your time zone then just use the code below :-
$DateTime = new DateTime(null, new DateTimeZone('Asia/New Delhi'));
$DateTime->setTimezone(new DateTimeZone('Asia/Ne...
Time Difference between two timezones - Php
Many a times we need to take out time difference between two time zone using Date class in php. We can use the following code :-
$timeZone = ['Any Timezone'];
$default = date("Y-m-d h:i:s A");// UTC
$dateTimeZone =...
Date difference between two timezones in PHP
Here is a short function to get the difference between two timezones in PHP:-
function diff(){
$date1 = "2014-02-27T20:00:00+04:00";
$date2 = "2014-02-28T07:20:00+08:00";
$diff = abs(strtotime($date2) - strtotime($date1));...
Some helpful date related code
Get a date after n days
-(NSDate*)getNextDayAfterDays:(int)numOfDays from:(NSDate*)date
{
NSCalendar *gregorian = [[NSCalendar alloc] initWithCalendarIdentifier:NSGregorianCalendar];
NSDateComponents *offsetComponents = [[NSDateCom...