Title: Custom date
Last modified: August 19, 2016

---

# Custom date

 *  [alexandreperei](https://wordpress.org/support/users/alexandreperei/)
 * (@alexandreperei)
 * [18 years, 1 month ago](https://wordpress.org/support/topic/custom-date/)
 * Hi guys, i have tgis code in my theme for date:
 * [code]<span class="postedby">Data <?php the_time('F jS, Y') ?></span>[/code]
 * how can i put the date in portuguese format?

Viewing 1 replies (of 1 total)

 *  [xanuex](https://wordpress.org/support/users/xanuex/)
 * (@xanuex)
 * [18 years, 1 month ago](https://wordpress.org/support/topic/custom-date/#post-755915)
 * if you mean by a Portuguese format that the days and months are in Portuguese
   names then this might work…
 * not tested, out of the blue…
 *     ```
       <?php
       function transformDate($date = date('w-d-n-Y'));
   
       	$dayN   = array('domingo', 'segunda-feira', 'terça-feira', 'quarta-feira', 'quinta-feira', 'sexta-feira', 'sábado');
       	$monthN = array('janeiro', 'fevereiro', 'março', 'abril', 'maio', 'junho', 'julho', 'agosto', 'setembro', 'outubro', 'novembro', 'dezembro');
   
           $dag=strftime("%w",strtotime($rij['datum']));
           $datumdag=strftime("%d",strtotime($rij['datum']));
           $maand=strftime("%n",strtotime($rij['datum']));
           $jaar=strftime("%Y",strtotime($rij['datum']));
   
           $dayName   = strftime("%w",strtotime($date));
           $dayNumber = strftime("%d",strtotime($date));
           $monthName = strftime("%n",strtotime($date));
           $Year      = strftime("%Y",strtotime($date)); 
   
           return $dayname." ".$dayNumber." ".$monthName." ".$year;
       }
       ?> 
   
       [code]<span class="postedby">Today is <? echo transformDate(); ?></span>[/code]
       ```
   

Viewing 1 replies (of 1 total)

The topic ‘Custom date’ is closed to new replies.

## Tags

 * [date](https://wordpress.org/support/topic-tag/date/)

 * 1 reply
 * 2 participants
 * Last reply from: [xanuex](https://wordpress.org/support/users/xanuex/)
 * Last activity: [18 years, 1 month ago](https://wordpress.org/support/topic/custom-date/#post-755915)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
