是否有办法只写一个限定日期,才能确认某种限制?
例如,第30/04/2010号是正确的,但第30-04/2010号是不正确的。
我 go笑了,发现了一些背靠道的情况,但我不清楚如何使用。 例如,如果具备这一规定:
http://www.un.org/? iii
那么,我为什么要在这里使用回轨?
非常感谢。
是否有办法只写一个限定日期,才能确认某种限制?
例如,第30/04/2010号是正确的,但第30-04/2010号是不正确的。
我 go笑了,发现了一些背靠道的情况,但我不清楚如何使用。 例如,如果具备这一规定:
http://www.un.org/? iii
那么,我为什么要在这里使用回轨?
非常感谢。
您没有回答问题,但您是否考虑使用strtotime()。
这是一种非常灵活的功能,能够规定任何公务员的日期和时间:
Feb 2, 2010
February 2, 2010
02/02/10
4 weeks ago
Next Monday
如果日期无法分开,则该功能将在PHP 5之前恢复<代码>false(或-1
)。
有几个信道——我认为我记得,在使用<条码>xx-xx时,它倾向于假定一个欧元的<代码>DD-MM-YYYYYY日期——但毕竟,你可能比起一个格列。
虽然Pekka的答复能更好地解决你的问题,但我认为应该回答你的这一部分问题:
那么,我为什么要在这里使用回轨?
这方面的实例与“05-07-2010”和“05/07/2010”相吻合,但并非“05-07/2010”:
"#^d{2}([/-])d{2}1d{4}$#"
------ --
栏目中最重要的部分为:<代码>1。 下面是第一部捕获子主<代码>([/-])代码。 http://php.net/manual/en/regexp.vis.back-viss.php” rel=“nofollow noreferer”>Back参引。
The regex you have, seems to check the string is in any of the possible formats that a datetime can be. If you just want to check for your given example 30/04/2010 you could use this easy one
([d]{1,2})/([d]{1,2})/([d]{2,4})
(日数和月数1-2位数,年数2-4位数)
I was try to measure what is faster and what should be the best way to compare two dates, from datetime record in MySql db. There are several approaches how to grab a date from date time, but I was ...
So I implemented a UIDatepicker in one of my applications for scheduling and autodialing teleconferences... everything is pretty much ready to go except, while testing I noticed that when the date ...
I have MMDDYY dates, i.e. today is 111609 How do I convert this to 11/16/2009, in Python?
I am wondering if there is a way to specify the date format in the forms created using CakePHP s $form->inputs(); Please note that this is not the individual $form->input() but instead $form->inputs() ...
Ok, this is really simple, maybe I m a getting a bit burnt out, but seems like it should work, Query XML feed, put out date string, format, display in a cell. The issue is I m a getting a NULL ...
I am exporting a date value from sqlite and placing it into an email. The date appears like this 279498721.322872 I am using Objective C in an Iphone App. Does anyone know how to make this export ...
I m trying to parse timestamp strings like "Sat, 11/01/09 8:00PM EST" in Python, but I m having trouble finding a solution that will handle the abbreviated timezone. I m using dateutil s parse() ...
I love the new DATE datatype in SQL Server 2008, but when I compare a DATE field to a DATETIME field on a linked server (SQL 2005, in this case), like this: DECLARE @MyDate DATE SET @MyDate = CONVERT(...