Welcome To Snipplr
Everyone's Recent Snippets Tagged date
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
PHP
Display wordpress posts with custom date meta value, ordered by this date, with a defined taxonomy
0
1054
posted 14 years ago by Mat_
First you have to add a custom value with a correct date format.
The lines:
`AND CAST(wpostmeta.meta_value AS DATE) > '".date("Y-m-d H:i:s")."'
AND CAST(wpostmeta.meta_value AS DATE) < '".date("Y-m-d H:i:s", $date2)."' `
are only used to select d...
0
1336
posted 14 years ago by Mat_
Simula in Django i campi created e updated aggiornati automaticamente alla creazione e alla modifica del record (Versione 2 senza funzione save ridefinita)
0
935
posted 14 years ago by munkypot
gets you a date string for today in YearMonthDay formant like this 20100917
0
870
posted 14 years ago by jlvallelonga
If on do nothing. If on make off. If off make on. Alter external value and focus.
0
753
posted 14 years ago by davebowker
Working on creating a 'days ago' script. I know some already exist, but I just want to know how to do it myself. I'm also incorporating leap year functionality and some utility functions that could be used on other projects.
2
1034
posted 14 years ago by alvincrespo
Questo snippet modifica la posizione della data del post se questo è più vecchio di trenta giorni dalla data di pubblicazione.
0
650
posted 14 years ago by gavello
This code uses Senocular SWFReader class to get the modification (publish) date of the SWF, and then displays it as a right-click menu item. You need to make sure that your SWF includes the XMP metadata. In the Flash IDE you can turn this on by going...
2
1208
posted 14 years ago by adrianparr
Useful for event dates - looks at the computers clock and tells the user when something will be available (e.g. this friday, tomorrow, etc). In this example I'm just using the day of a month, but you can use any part/the full date if you desire....
0
722
posted 14 years ago by IsoJon
In drupal, you can configure custom formats at:
http://yourdomain.com/admin/settings/date-time/formats/add
You can also use these in a custom php function like:
<?php>created, 'custom', "F jS, Y"); ?>
To look up more options see http://php.ne...
1
660
posted 14 years ago by MikeyLikesIt