×

Kos nating, yu save senisim wiset bilong websait bilong yu

Nidim tru gutpela klok long websait bilong yu? O yu nidim de bilong tude, taim bilong sankamap, taim bilong sandaun o hau longpela de bin stap? Kisim bilong ol opsen andanit na yusim kod! I stap kos nating!

Ol opsen

Ples
Sound, Inglan, United Kingdom
Bilong ol narapela ples, plis yusim boks bilong lukim long tap rait.
Wanem long soim




Taim kain



Det kain




 
De:
daynameFraide
dnameFra
daynum01-31
dnum1-31
day_in_yde 1-366
Wik:
weekwik 47
Manth:
monthnameNovemba
monthnum01-12
mnum1-12
Yia:
year2024
yy24
Kala na sais
px
Wanem i bin lukim laik
Taim long Sound:
Pinis resalt save bin narakain, dipendim long ol stail sit long web pes bilong yu.
Yu save stailim widset sampela we yu nidim bilong CSS.

Dispela i stap kod bilong web klok bilong yu:

Tem bilong yusim

Bikpela yus

I stap tu widset skrip: Wanpela besik kain, t.js, tasol i soim taim, na bikpela widset skript, tpi.js, i save soim taim, de, sankamap, sandaun na hau long de stap. Bikpela widset skript i stap long plenti toktok. Long narapela toktok, senisim tpi long skript nem bilong kod bilong toktok yu yusim. (Ekasmpol: pl.js bilong Tok Polan, o tr.js bilong Tok Teki.)

Paremita bilong init fanksen:

ParemitaWed larimNomal valyu
templateTIME, DATE, SUNTIME
time_formathours, minutes, seconds, 12hours, AMPMhours:minutes:seconds
date_formatdayname, dname, daynum, dnum, day_in_y, week, monthname, monthnum, mnum, yy, yearyear-monthnum-daynum
sun_formatsrhour, srminute, sr12hour, srAMPM, sshour, ssminute, ss12hour, ssAMPM, dlhours, dlminutessrhour:srminute-sshour:ssminute
coordsLetitud na longtitud bilong ples. Nidim bilong soim taim bilong san na hau long de stap.
idBilong painim ples na taimsoen long seva said. Nidim sapos ples nem gat non-ASCII leta, na sapos yu senisim HTML element id.
callbackNem bilong fanksen em bin kolim ol sekan, gat renderim templet long paremita. (Opsenel)

Ol paremita nem na kiwed bin kes sensitiv. Yu save yusim HTML na narapela kontent long templet, time_format, date_format na sun_format paremita.

Plas wan klok bin mekim laik dis:

UTC time: <span id="UTC_za00"></span><br/>
New York sunrise time: <span id="New_York_z161"></span><br/>
Tokyo sunrise time: <span id="Tokyo_z444"></span><br/>
Find the <a href="https://time.is/" id="time_is_link" rel="nofollow">current time for any location or time zone on Time.is!</a>
<script src="//widget.time.is/tpi.js"></script>
<script>
time_is_widget.init({
	UTC_za00 : {},
	New_York_z161 : {
		template: "SUN",
		sun_format: "srhour:srminute",
		coords: "40.71427,-74.00597"
		},
	Tokyo_z444 : {
		coords: "59.33258,18.06490"
		}
	});
</script>

Resalt:

UTC time:
New York sunrise time:
Tokyo sunrise time:
Find the current time for any location or time zone on Time.is!

Ol valyu bilong time_format, date_format, sun_format na template paremita save inheritin, na yu nogat nidim long ripitim sapos valyu i stap long bilong bipo defainim widset.

 
 
Fraide, Novemba 22, 2024, wik 47