There are several possible scenarios for a piece of text:
Used a
1 hours 43 minutes
Used a
1 hours
Used a
43 minutes
To achieve this is to match the time from the text, that is, the bold part
Now think of the regular expression is Preg_match ('/
Link: http://chn.blogbeta.com/133.html
Do you often hear people say "I really want to have a few more hours a day" or something like this? Of course, in reality, we only have 24 hours a day. Let's say that how people spend the 24 hours is totally
http://blog.csdn.net/redarmy_chen/article/details/7351410Oracle Two time subtraction default is the number of daysOracle two time subtraction The default is the number of days *24 is the difference between the hoursOracle two time subtraction The
// Obtain the last day of a month// Method 1: calculate the number of days of the month, and the number of days plus the year + month. The example shows the last day of the month.Private void getlastdateformonth (datetime dtstart, out datetime dtend)
First, add the following code to the topic's functions. php file: The code is as follows:Copy code Function timeago ($ ptime ){$ Ptime = strtotime ($ ptime );$ Etime = time ()-$ ptime;If ($ etime $ Interval = array (12*30*24*60*60 => 'years ago (
Add three days to the current date and change the number of days:SELECT Date_add (Current_date (), Interval 3 day);Add three days to the specified date:SELECT date_add (' 2014-04-17 ', Interval 3 day);-2014-04-20Add a time to the specified time:As
Today, I received a letter from a student asking for an algorithm to calculate the number of hours between two points, along with a request: 30 minutes per 0.5 hours, such as 25 minutes 0, 45 minutes can be counted 0.5 hours. This application is
PHPdate (& quot; Y-m-dH: I: s & quot;); get the current time difference of 8 hours solution (convert) PHPdate (Y-m-dH: I: when the time difference between the current and current time is 8 minutes, the swill will be able to cancel the resolution.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.