<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Julien Breux &#187; fonction</title>
	<atom:link href="http://www.julien-breux.com/mot-clef/fonction/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.julien-breux.com</link>
	<description>Consultant - Développeur - Formateur - PHP, Prestashop, Wordpress</description>
	<lastBuildDate>Mon, 15 Aug 2011 17:00:28 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Fonction PHP &#8211; Nombre de jours dans le mois</title>
		<link>http://www.julien-breux.com/2009/02/19/fonction-php-nombre-de-jours-dans-le-mois/</link>
		<comments>http://www.julien-breux.com/2009/02/19/fonction-php-nombre-de-jours-dans-le-mois/#comments</comments>
		<pubDate>Thu, 19 Feb 2009 13:00:05 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Fonctions PHP]]></category>
		<category><![CDATA[date]]></category>
		<category><![CDATA[fonction]]></category>
		<category><![CDATA[mois]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.julien-breux.com/?p=53</guid>
		<description><![CDATA[Description Fonction retournant le nombre de jours dans un mois. Source &#60;?php /** * Fonction retournant le nombre de jours dans un mois. * @param integer $month Mois de 1... <a class="meta-more" href="http://www.julien-breux.com/2009/02/19/fonction-php-nombre-de-jours-dans-le-mois/">Lire la suite <span class="meta-nav">&#187;</span></a>]]></description>
			<content:encoded><![CDATA[<h1>Description</h1>
<p>Fonction retournant le nombre de jours dans un mois.</p>
<h1>Source</h1>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #009933; font-style: italic;">/**
* Fonction retournant le nombre de jours dans un mois.
* @param integer $month Mois de 1 à 12
* @param integer $year Année
* @return integer Nombre de jours
*/</span>
<span style="color: #000000; font-weight: bold;">function</span> maxDaysInMonth<span style="color: #009900;">&#40;</span><span style="color: #000088;">$month</span><span style="color: #339933;">,</span> <span style="color: #000088;">$year</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
  <span style="color: #000088;">$days</span> <span style="color: #339933;">=</span> <span style="color: #990000;">cal_days_in_month</span><span style="color: #009900;">&#40;</span>CAL_GREGORIAN<span style="color: #339933;">,</span> <span style="color: #000088;">$month</span><span style="color: #339933;">,</span> <span style="color: #000088;">$year</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #b1b100;">return</span> <span style="color: #000088;">$days</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<h1>Exemple</h1>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #b1b100;">echo</span> maxDaysInMonth<span style="color: #009900;">&#40;</span><span style="color: #208080;">02</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">2012</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// Affiche 29</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<h1>Source</h1>
<p><a href="/sources/maxDaysInMonth.phps">Télécharger la source</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.julien-breux.com/2009/02/19/fonction-php-nombre-de-jours-dans-le-mois/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Fonction PHP &#8211; Date française vers timestamp</title>
		<link>http://www.julien-breux.com/2009/02/17/fonction-php-date-francaise-vers-timestamp/</link>
		<comments>http://www.julien-breux.com/2009/02/17/fonction-php-date-francaise-vers-timestamp/#comments</comments>
		<pubDate>Tue, 17 Feb 2009 14:00:31 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Fonctions PHP]]></category>
		<category><![CDATA[date]]></category>
		<category><![CDATA[fonction]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[timestamp]]></category>

		<guid isPermaLink="false">http://www.julien-breux.com/?p=40</guid>
		<description><![CDATA[Description Fonction de conversion de date du format français (JJ/MM/AAAA) en Timestamp. Source &#60;?php /** * Fonction de conversion de date du format français (JJ/MM/AAAA) en Timestamp. * @param string... <a class="meta-more" href="http://www.julien-breux.com/2009/02/17/fonction-php-date-francaise-vers-timestamp/">Lire la suite <span class="meta-nav">&#187;</span></a>]]></description>
			<content:encoded><![CDATA[<h1>Description</h1>
<p>Fonction de conversion de date du format français (JJ/MM/AAAA) en Timestamp.</p>
<h1>Source</h1>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #009933; font-style: italic;">/**
* Fonction de conversion de date du format français (JJ/MM/AAAA) en Timestamp.
* @param string $date Date au format français (JJ/MM/AAAA)
* @return integer Timestamp en seconde
*/</span>
<span style="color: #000000; font-weight: bold;">function</span> dateFR2Time<span style="color: #009900;">&#40;</span><span style="color: #000088;">$date</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
  <span style="color: #990000;">list</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$day</span><span style="color: #339933;">,</span> <span style="color: #000088;">$month</span><span style="color: #339933;">,</span> <span style="color: #000088;">$year</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">=</span> <span style="color: #990000;">explode</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'/'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$date</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #000088;">$timestamp</span> <span style="color: #339933;">=</span> <span style="color: #990000;">mktime</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span> <span style="color: #000088;">$month</span><span style="color: #339933;">,</span> <span style="color: #000088;">$day</span><span style="color: #339933;">,</span> <span style="color: #000088;">$year</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #b1b100;">return</span> <span style="color: #000088;">$timestamp</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<h1>Exemple</h1>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #b1b100;">echo</span> dateFR2Time<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'16/01/1987'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// Affiche 537750000</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<h1>Source</h1>
<p><a href="/sources/dateFR2Time.phps">Télécharger la source</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.julien-breux.com/2009/02/17/fonction-php-date-francaise-vers-timestamp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fonction PHP &#8211; Date américaine vers timestamp</title>
		<link>http://www.julien-breux.com/2009/02/16/fonction-php-date-americaine-vers-timestamp/</link>
		<comments>http://www.julien-breux.com/2009/02/16/fonction-php-date-americaine-vers-timestamp/#comments</comments>
		<pubDate>Mon, 16 Feb 2009 13:00:18 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Fonctions PHP]]></category>
		<category><![CDATA[date]]></category>
		<category><![CDATA[fonction]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[timestamp]]></category>

		<guid isPermaLink="false">http://www.julien-breux.com/?p=33</guid>
		<description><![CDATA[Description Fonction de conversion de date du format américain (AAAA-MM-JJ) en Timestamp. Source &#60;?php /** * Fonction de conversion de date du format américain (AAAA-MM-JJ) en Timestamp. * @param string... <a class="meta-more" href="http://www.julien-breux.com/2009/02/16/fonction-php-date-americaine-vers-timestamp/">Lire la suite <span class="meta-nav">&#187;</span></a>]]></description>
			<content:encoded><![CDATA[<h1>Description</h1>
<p>Fonction de conversion de date du format américain (AAAA-MM-JJ) en Timestamp.</p>
<h1>Source</h1>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #009933; font-style: italic;">/**
* Fonction de conversion de date du format américain (AAAA-MM-JJ) en Timestamp.
* @param string $date Date au format américain (AAAA-MM-JJ)
* @return integer Timestamp en seconde
*/</span>
<span style="color: #000000; font-weight: bold;">function</span> dateUS2Timestamp<span style="color: #009900;">&#40;</span><span style="color: #000088;">$date</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
  <span style="color: #990000;">list</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$year</span><span style="color: #339933;">,</span> <span style="color: #000088;">$month</span><span style="color: #339933;">,</span> <span style="color: #000088;">$day</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">=</span> <span style="color: #990000;">explode</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'-'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$date</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #000088;">$timestamp</span> <span style="color: #339933;">=</span> <span style="color: #990000;">mktime</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span> <span style="color: #000088;">$month</span><span style="color: #339933;">,</span> <span style="color: #000088;">$day</span><span style="color: #339933;">,</span> <span style="color: #000088;">$year</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #b1b100;">return</span> <span style="color: #000088;">$timestamp</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<h1>Exemple</h1>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #b1b100;">echo</span> dateUS2Timestamp<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'1987-01-16'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// Affiche 537750000</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<h1>Source</h1>
<p><a href="/sources/dateUS2Time.phps">Télécharger la source</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.julien-breux.com/2009/02/16/fonction-php-date-americaine-vers-timestamp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

