Questions tagged [zend-date]
64 questions
1
vote
2 answers
How print all the weeks in an year (or first monday of year)
How print all the weeks which start with monday and end with sunday.. like below ..using Zend_date
1 04-Jan-2010-10-Jan-2010
2 11-Jan-2010-17-Jan-2010
3 18-Jan-2010-24-Jan-2010

Nisanth Kumar
- 5,667
- 8
- 33
- 43
1
vote
2 answers
PHP loop, date sorting challenge
I'm having trouble trying to figure out how to achieve this programming challenge in my Zend Framework application:
I need to create an array that looks like this:
$array = array(
0 => stdClass()->monthName
->monthResources =…

Andrew
- 227,796
- 193
- 515
- 708
1
vote
2 answers
Get the date from a time string
Is there a way to convert an input time string (ex: 01:13) to a Zend date object, so that I store it later in a timestamp column in a Mysql database.
Examples:
If the current datetime is 2013-07-15 17:33:07 and the user inputs 18:05 the output…

Songo
- 5,618
- 8
- 58
- 96
1
vote
1 answer
Strange error in the Zend_Date localization
I have two problems in my little script. I am trying to create an application that use Zend Framework 1.12.1, Doctrine, Zend_locale, Zend_Currency and Zend_Date.
Dates:
The database needs a date in this format Y-m-d H:i:s but each user set their…

Michelangelo
- 1,398
- 2
- 14
- 37
1
vote
1 answer
Is it possible to set Zend_Date options in application.ini config?
Is it possible to set Zend_Date options in application.ini config like this:
resources.date.options.format_type = php
in Zend Framework v 1.* ?

avasin
- 9,186
- 18
- 80
- 127
1
vote
2 answers
Zend_Date() is not giving the correct/expected result
Zend_Date function returns the value "Feb 10, 2012" . It supposed to return "Oct 2, 2012". If a give the day greater than 12 than it returns the currect output. I don't know what I was missing. Please help me.
Thanks

user1559230
- 2,790
- 5
- 26
- 32
1
vote
1 answer
How to use an abbreviated month with Zend_Date and locale formatting
I'm trying to set a long date format with an abbreviated month that uses the locale of the user. Here's what I have now.
//getDateTimeObject('field') grabs a Zend_Date object of the field
$creationDate =…

Bryan Phillips
- 23
- 5
0
votes
1 answer
populating hours/dates into a Zend_Form_Element_Select
I'm looking for Zend_Form elements which will allow me to integrate Zend_Date values easily.
For example, I need a hour picker and a week day picker in my forms. for example, the hour picker should display all the hour values from 12:00 AM to 11:00…

aporat
- 5,922
- 5
- 32
- 54
0
votes
1 answer
convert date to a different format
I have a date of the form mm-dd-yyyy. I need to convert into YYYY-MM-dd to store in the database.
I did the following
$eff_date=$this->post['effective_date'];
$eff_date=$eff_date->toString('YYYY-MM-dd');
I get the following error:
Call to a member…

newbie
- 1,023
- 20
- 46
0
votes
2 answers
Calculating difference between 2 Zend_Date objects
I have 2 Zend_Date objects:
$d1 = new Zend_Date('2011-11-14 12:20:30');
$d2 = new Zend_Date('2012-11-16 13:40:10');
And I need to calculate difference. My output should be like this:
Years: 1, Months: 0, Days: 2, Hours: 1, Minutes: 19, Seconds:…

Alex Pliutau
- 21,392
- 27
- 113
- 143
0
votes
1 answer
How do I find out if current Zend_Date time is between time today and time tomorrow?
Hello I am using $currentDate = new Zend_Date(); to get the current time but I need to determine if that time is between say 10pm and 2am - how can I do this with Zend_Date, the next day part is what is throwing me off since I'm comparing a time…

Pippy Longstocking
- 261
- 5
- 12
0
votes
1 answer
EndDate Issue - Last Month of Year
I have a .netapp application (C#) that I use to extract data from an API.
It is having a problem just now as we are running this for December 2017.. but we want it to name as January 2018. (well 01/01/2018)
I think they way we have written it means…

craig157
- 355
- 1
- 3
- 18
0
votes
2 answers
Zend Date giving me zeroes, why?
More problems with dates.
Basically I'm trying to populate a table with some datetime values from Zend. The datatype of the column that I'm trying to populate is 'datetime'. However, no matter which constant I try the column is always populated with…

Fortisimo
- 1,012
- 2
- 11
- 26
0
votes
1 answer
Location of Zend_Date PHP class
I'm trying to use the Zend_Date class for my project. I'm working with the PHP Storm IDE and I've searched throughout the ZF2 folder which is included in my project under the:
/vendor/ZF2/library/Zend/ -> now it should be somewhere here but I…

perkes456
- 1,163
- 4
- 25
- 49
0
votes
1 answer
Zend_Date returning strange format online - works fine on my localhost
I have the following code to format dates:
$date = new Zend_Date();
$date->set(strtotime($some_date);
echo ($date->get(Zend_Date::DATE_FULL));
it wokrs fine on my localhost outputting the date as I need it to be outputted. However on my online…

Ali
- 7,353
- 20
- 103
- 161