Jump to content

HTML licznik dni od ustalonej daty


Recommended Posts

{{$date = \IPS\DateTime::formatInterval( \IPS\DateTime::create()->diff( \IPS\DateTime::ts( \intval( strtotime('07/28/2010') ) ) ), 5 ) ;}}
{$date|raw}
10 lat, 4 miesiące, 5 dni, 15 godzin i 29 minut

 

Link to post
Share on other sites

Przecież napisał że w swojej stronie , gdzie tu mowa o integracji z ipb ?

22 godziny temu, Weak. napisał:

{{$date = \IPS\DateTime::formatInterval( \IPS\DateTime::create()->diff( \IPS\DateTime::ts( \intval( strtotime('07/28/2010') ) ) ), 5 ) ;}}
{$date|raw}

10 lat, 4 miesiące, 5 dni, 15 godzin i 29 minut

 

 

Nie bądź pijawką. Rozwiązałeś problem? Podziel się rozwiązaniem na forum.

Małe jest piękne ale.... duże bardziej cieszy.

Link to post
Share on other sites

Może coś takiego

<script>

var montharray=new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec")

function countup(yr,m,d){
var today=new Date()
var todayy=today.getFullYear()
var todaym=today.getMonth()
var todayd=today.getDate()
var todaystring=montharray[todaym]+" "+todayd+", "+todayy
var paststring=montharray[m-1]+" "+d+", "+yr
var difference=(Math.round((Date.parse(todaystring)-Date.parse(paststring))/(24*60*60*1000))*1)
difference+=" dni"
document.write("Ta strona działa już "+difference+"")
}
//Data startu
countup(2020,06,14)
//-->
</script>

http://jsfiddle.net/8ec91zdt/

Edited by DejaVu24
Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.