ADmad
79ad8ab95a
Merge branch 'master' into 2.4
...
Conflicts:
lib/Cake/Utility/File.php
2013-04-14 00:05:18 +05:30
mark_story
8bd1980dd4
DateTime::getTimestamp() is PHP5.3+
2013-04-11 13:39:05 -04:00
mark_story
5c83bc177d
Merge branch 'master' into 2.4
...
Conflicts:
lib/Cake/Model/Model.php
lib/Cake/VERSION.txt
2013-04-09 22:09:56 -04:00
mark_story
0e646a2a4d
Fix incorrect timestamp values when using fromString()
...
When using fromString() on DateTime objects that were in the global
timezone, an incorrect value would be returned.
Fixes #3743
2013-04-09 21:30:20 -04:00
mark_story
d28c2f8e72
Fix code & tests for isPast() and isFuture()
...
The methods and tests now follow coding standards and work.
2013-03-30 22:24:14 -04:00
Roberto Frega
632c4feb5d
Adds two new time testing methods: 'isFuture' and 'isPast'
...
TestCases included
2013-03-30 22:24:08 -04:00
euromark
111366d5c8
== to === and != to !== where applicable
2013-02-12 03:38:08 +01:00
Graham Weldon
66d856d883
Added extra line for referencing license file for copyright
2013-02-08 21:22:51 +09:00
Graham Weldon
7b860debe4
This commit is dedicated to Mark Story, who has put in much dedicated time and effort into CakePHP over the years.
...
I just wanted to ruin his evening, because this change needs to be merged into CakePHP 3.0.
2013-02-08 20:59:49 +09:00
mark_story
4af6039107
Merge branch 'master' into 2.3
...
Conflicts:
lib/Cake/Console/Command/Task/ModelTask.php
lib/Cake/Model/Model.php
2013-01-26 21:16:26 -05:00
mark_story
ad0d6644c4
Partially revert default niceShortFormat
...
In 9fa531d6e3
the default niceShortFormat
was changed, which has been interpreted as a regression in #3533 .
This change partially reverts the previous change and tries to strike
a balance between the old behavior and new.
Refs #3533
2013-01-14 21:12:11 -05:00
ADmad
72d6ca636f
Docblock fixes
2012-11-29 04:36:29 +05:30
dogmatic69
408e619c9f
Merge branch '2.3' into type-checks
...
Conflicts:
lib/Cake/Console/Command/Task/ModelTask.php
lib/Cake/Controller/Component/RequestHandlerComponent.php
lib/Cake/Model/Datasource/Database/Mysql.php
lib/Cake/Utility/CakeNumber.php
2012-10-01 02:08:00 +01:00
Jose Lorenzo Rodriguez
d5c9d97dc1
Merge remote-tracking branch 'origin/master' into 2.3
...
Conflicts:
lib/Cake/Model/Behavior/TranslateBehavior.php
lib/Cake/Model/CakeSchema.php
lib/Cake/Utility/CakeTime.php
lib/Cake/Utility/ClassRegistry.php
lib/Cake/View/MediaView.php
2012-09-25 16:36:03 +02:00
Jose Lorenzo Rodriguez
6818d69fc3
Fixed issue in CakeTime that it would apply userOffset twice when using
...
the format() function
2012-09-25 15:23:46 +02:00
dogmatic69
b1f26b59a3
converting if ($foo != null) to if ($foo)
2012-09-21 23:30:43 +01:00
dogmatic69
aa87791432
replacing is_integer() with is_int()
2012-09-15 11:15:01 +01:00
dogmatic69
cfadc4dbb0
strict type checks and removing some duplicate count() calls by setting a variable
2012-09-14 19:26:00 +01:00
dogmatic69
22a2e1b51e
converting $foo == / $foo == 0 to !$foo (and a few $foo === 0)
2012-09-14 18:42:25 +01:00
mark_story
ec54fa57c5
Merge branch 'simplify-cake-time' into 2.3
...
Conflicts:
lib/Cake/Utility/CakeTime.php
2012-09-13 20:45:59 -04:00
dogmatic69
95b895b19a
Simplify the cake time class
...
Removed a lot of nested ?: code and nested if/else statements broken down
with early return. Moving a few variables lower down the function calls as
there are times when they are not even needed.
Also removed setting variables that are returned on the next line.
2012-09-13 22:17:01 +01:00
dogmatic69
cf361040a4
adding the timezone as it was not being used
2012-09-13 06:45:44 +01:00
Kyle Robinson Young
200dd2dc9b
Code standards fixes, unneeded break statements
2012-09-04 11:30:52 -07:00
mark_story
b68a2ed84d
Update API docs.
2012-08-26 22:15:18 -04:00
mark_story
3f78216e96
Revert changes in behavior made to timeAgoInWords()
...
Changes made in [0729aca706
] changed
the generated text to not match the behavior in 2.1.
2012-06-24 20:54:47 -04:00
Jelle Henkens
db7d5426ec
CakeTime no longer sets the timezone out of its scope on the date object
2012-06-24 11:10:55 +01:00
Jose Lorenzo Rodriguez
2a90baae0c
Forgot to include complete patch in last commit :(
...
Note: It's not good to commit while watching tv
2012-06-09 15:01:27 -04:30
Jose Lorenzo Rodriguez
d13deb7da2
Fixing param usage introduced in previous commit
2012-06-09 14:52:03 -04:30
Jose Lorenzo Rodriguez
a2c2902dd6
Renaming param in CakeTime::format() to make its purpose more obvious,
...
added some examples in doc block
2012-06-09 08:45:46 -04:30
Jose Lorenzo Rodriguez
0d013f8da5
Fixing CakeTime, the actual params for format() is $date and $format,
...
and not the other way around :)
2012-06-09 08:28:39 -04:30
Jelle Henkens
ecd869d4e3
Changing int to integer
2012-05-22 16:34:07 +01:00
Jelle Henkens
f7ce5262b7
Updating mixed @param documentation to seperate list of accepted types
2012-05-21 21:55:10 +01:00
ADmad
e58e3c5314
Fix regex for failing test on 5.2
2012-05-21 19:48:47 +05:30
ADmad
cfd9d8a815
Added CakeTime::listIdentifiers()
2012-05-21 03:05:42 +05:30
Jelle Henkens
5fe22cfc8d
Adding support for DateTime objects in the CakeTime Utility class
2012-05-17 19:31:30 +01:00
Rachman Chavik
f89bc6503a
CakeTime::format crashed when timezone is passed
2012-05-17 19:05:45 +07:00
Jelle Henkens
0d9506fa2e
Fixing issue where nice and niceShort did not use the timezone if no dateString is passed
2012-05-13 13:43:06 +01:00
mark_story
64f03acd4c
Fix code standards errors.
2012-05-12 23:28:43 -04:00
mark_story
14bfd83dad
Reduce complexity in timeAgoInWords.
...
All the special cases were handled by the deeply
nested if.
2012-05-12 22:26:34 -04:00
mark_story
ca8046bfea
Fix whitespace and formatting.
2012-05-12 22:26:33 -04:00
Magnus Johansson
352fbde2ec
Move out HTML logic to Helper/TimeHelper.php. The Utility/CakeTime.php timeAgoInWords() now returns a string with the time, while the same function in Helper/TimeHelper.php may return an HTML element.
2012-05-12 22:26:33 -04:00
Magnus Johansson
9fa531d6e3
Added test cases for new features.
2012-05-12 22:26:33 -04:00
Magnus Johansson
0729aca706
Added some more intelligence to the CakeTime class
2012-05-12 22:25:48 -04:00
ADmad
14b7210d2b
Fixed server offset calculation
2012-05-13 06:20:29 +05:30
ADmad
061483d03e
Added missing keyword
2012-04-25 11:03:26 +05:30
ADmad
3800029c9a
Fix docblock
2012-04-22 02:22:48 +05:30
ADmad
d26f869455
Added function to get timezone object
2012-04-22 01:59:26 +05:30
ADmad
058d57a85a
Added function to convert time from user timezone to server timezone.
2012-04-22 01:59:26 +05:30
ADmad
a96de99388
Tweak docblocks
2012-04-22 01:59:26 +05:30
ADmad
ebf304927b
Added "Config.timezone" config param to avoid having to specify timezone in each function call.
2012-04-22 01:59:26 +05:30