All language subtitles for 09 - Dates and times.en

af Afrikaans
ak Akan
sq Albanian
am Amharic
ar Arabic Download
hy Armenian
az Azerbaijani
eu Basque
be Belarusian
bem Bemba
bn Bengali
bh Bihari
bs Bosnian
br Breton
bg Bulgarian
km Cambodian
ca Catalan
ceb Cebuano
chr Cherokee
ny Chichewa
zh-CN Chinese (Simplified)
zh-TW Chinese (Traditional)
co Corsican
hr Croatian
cs Czech
da Danish
nl Dutch
en English
eo Esperanto
et Estonian
ee Ewe
fo Faroese
tl Filipino
fi Finnish
fr French
fy Frisian
gaa Ga
gl Galician
ka Georgian
de German
el Greek
gn Guarani
gu Gujarati
ht Haitian Creole
ha Hausa
haw Hawaiian
iw Hebrew
hi Hindi
hmn Hmong
hu Hungarian
is Icelandic
ig Igbo
id Indonesian
ia Interlingua
ga Irish
it Italian
ja Japanese
jw Javanese
kn Kannada
kk Kazakh
rw Kinyarwanda
rn Kirundi
kg Kongo
ko Korean
kri Krio (Sierra Leone)
ku Kurdish
ckb Kurdish (Soranî)
ky Kyrgyz
lo Laothian
la Latin
lv Latvian
ln Lingala
lt Lithuanian
loz Lozi
lg Luganda
ach Luo
lb Luxembourgish
mk Macedonian
mg Malagasy
ms Malay
ml Malayalam
mt Maltese
mi Maori
mr Marathi
mfe Mauritian Creole
mo Moldavian
mn Mongolian
my Myanmar (Burmese)
sr-ME Montenegrin
ne Nepali
pcm Nigerian Pidgin
nso Northern Sotho
no Norwegian
nn Norwegian (Nynorsk)
oc Occitan
or Oriya
om Oromo
ps Pashto
fa Persian
pl Polish
pt-BR Portuguese (Brazil)
pt Portuguese (Portugal)
pa Punjabi
qu Quechua
ro Romanian
rm Romansh
nyn Runyakitara
ru Russian
sm Samoan
gd Scots Gaelic
sr Serbian
sh Serbo-Croatian
st Sesotho
tn Setswana
crs Seychellois Creole
sn Shona
sd Sindhi
si Sinhalese
sk Slovak
sl Slovenian
so Somali
es Spanish
es-419 Spanish (Latin American)
su Sundanese
sw Swahili
sv Swedish
tg Tajik
ta Tamil
tt Tatar
te Telugu
th Thai
ti Tigrinya
to Tonga
lua Tshiluba
tum Tumbuka
tr Turkish
tk Turkmen
tw Twi
ug Uighur
uk Ukrainian
ur Urdu
uz Uzbek
vi Vietnamese
cy Welsh
wo Wolof
xh Xhosa
yi Yiddish
yo Yoruba
zu Zulu

Original subtitles

- Dates, let's talk about dates and times.

If you've done any programming in any language,

and you know that handling dates and times

can get messy quick, well not so much in HTML.

HTML simply has one element that we use to mark anything

that's specifying a time of day, a date, or span of time,

the time element.

We use the time element to format a date or time,

anything that's related to a specific moment or range

in time, into something other computers can understand.

The time element has an opening and a closing tag,

the opening time tag, May 8th the closing time tag.

Or like this with year, May 8th 2025.

Well or some people write dates like that,

others write it like this 8th May 2025.

We can use any human understandable format

for the phrase of text that's between the tags.

That's what will get displayed on the webpage,

that's what other humans will see.

But the whole point of this element is to convey

to computers exactly when this date or time is.

For that, we use what's called an HTML attribute.

Now we haven't talked about HTML attributes yet,

we can put an attribute on any HTML element.

And I'll get into that in a later video,

but let's just start with the attribute

that will give us a place to put data,

about when this date or time is.

Data that a computer will understand.

We've already learned that the element name goes first,

right after the opening less than sign.

Then let's type a space and right the attribute name,

followed by equals and the attribute value inside quotes.

For the time element,

we're going to use the date time attribute data.

Datetime all one word, datetime equals 2025 dash 05 dash 08.

The time inside the date time attribute,

needs to be in a specific format.

There's a specific machine-readable format

for dates and times, and we have to use that.

Let's look at some more examples May 8th is conveyed 05, 08.

With a year no matter how its phrase for humans,

the machine-readable version in the datetime attribute

is written, 2025 dash 05, dash 08,

the year and four digits then the month in two digits,

and then the date in two digits.

Or maybe we don't have a date,

and we just have the month and the year.

Or maybe we just have the year.

We don't have to write out the date on the web page.

Lots of times sites will use time stamps

with phrases like five hours ago or 10 days ago,

but the attributes still uses

a proper machine-readable version,

anything is allowed for humans.

The machines want a very standardized format,

we can also mark up times with the time element.

The machine-readable version wants numbers

in the 24 hour clock format, we can include seconds

and fractions of a second or not.

We can include the time zone 15 45 minus 05 00,

means 15 45 or 3:45pm

in the time zone that's minus five hours

from Greenwich Mean Time,

so five hours behind the time in London

which is the timezone for New York City.

Of course we can use the date and time together,

the date comes first inside the datetime attribute

and then the time, we can put a T between the date and time

or we can put a space there.

There are many slightly different ways to format

the machine-readable daytime

that are all allowed, all correct.

These rules for machine format a dates

are not just for HTML.

This is how dates and times get formatted

for a lot of programming languages.

There are hundreds of possible combinations

that are all allowed.

Definitely look this up when you need to know how to do it.

The time element with its datetime attribute

is how we communicate time semantically,

so that the computers out there can understand when.

Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.