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
ADmad
d34f0c2bd8
CakeTime functions can now use timezone string or DateTimeZone object for user offsets. (Passing numeric offsets has been kept for BC)
2012-04-22 01:59:08 +05:30
Juan Basso
c754fb2dcb
Updated copyright to 2012.
2012-03-12 22:46:46 -04:00
mark_story
9d325fe46e
Fixing most coding standard issues in Utility/
2012-03-03 17:31:47 -05:00
Majna
0cd9a93e9e
Remove unused variables and statements.
2012-02-17 21:10:43 +01:00
mark_story
6412797dfc
Add missing static.
2012-02-16 20:58:43 -05:00
Rachman Chavik
d6fd051fb4
changing methods in CakeTime class to static
2012-02-14 09:34:36 +07:00
Rachman Chavik
04cdef9126
moving TimeHelper to CakeTime
2012-02-10 22:25:59 +07:00