Welcome Guest, Not a member yet? Register   Sign In
Get month from calender class
#1

[eluser]foysal[/eluser]
Hi all

I would like to get month name from calender class to use in my model to inset in database.


Do you know how can I do that??



Foysal
#2

[eluser]Mr. Pickle[/eluser]
What month name do you want? The month name of the current date?
The month name by the numeric month (e.g. 12 = December)
#3

[eluser]foysal[/eluser]
I would like to get the month name of generated calender from template. It is not a problem if it is a numeric month.

Thanks for reply


Foysal
#4

[eluser]foysal[/eluser]
Is it possible to get month name from calender class which is reside inside library folder of CodeIgniter ??
#5

[eluser]Twisted1919[/eluser]
The documentation clearly states:
Code:
$this->load->library('calendar');

$data = array(
               3  => 'http://example.com/news/article/2006/03/',
               7  => 'http://example.com/news/article/2006/07/',
               13 => 'http://example.com/news/article/2006/13/',
               26 => 'http://example.com/news/article/2006/26/'
             );

echo $this->calendar->generate(2006, 6, $data);

//

Using the above example, day numbers 3, 7, 13, and 26 will become links pointing to the URLs you've provided.

So what is the problem ?
#6

[eluser]foysal[/eluser]
I used the folowing code in my controller to get calender.

$vars['calendar'] = $this->calendar->generate($this->uri->segment(3), $this->uri->segment(4), $data);


I would like to get the month name from a generated calender. That means I am in month of june 2011 by clicking next/previous link. Then I would like to get the month name of june 2011.

Thanks for reply.

Foysal




Theme © iAndrew 2016 - Forum software by © MyBB