TGViewer
JavaScript test JavaScript test @js_test · 9.69K subscribers
Post #5168 689
❗️Что будет на выходе:

const date = new Date('2023-05-15T12:30:00Z');  // A specific UTC date

const formatter = new Intl.DateTimeFormat('en-US', {
year: 'numeric',
month: 'long',
day: 'numeric',
hour: '2-digit',
minute: '2-digit',
timeZone: 'America/New_York'
});

const parts = formatter.formatToParts(date);
const month = parts.find(part => part.type === 'month').value;
const day = parts.find(part => part.type === 'day').value;
const hour = parts.find(part => part.type === 'hour').value;

console.log(`${month} ${day}, at ${hour}`);

Ответ: May 15, at 08

JavaScript test | #JavaScript
More from @js_test
  1. Oct 11, 2026❗️Что будет на выходе: const obj = {}; Object.defineProperty(obj, 'name', { value: 'Alice'…
  2. Oct 10, 2026❗️Что будет на выходе: async function fetchData() { return 'Data loaded'; } async function…
  3. Oct 10, 2026Муха освоила нейросети и умеет трейдить, играть в гта, делать ставки, а ты пользуешься тол…
  4. Oct 10, 2026❗️Что будет на выходе: function highlight(strings, ...values) { return strings.reduce((res…
  5. Oct 10, 2026❓Что будет на выходе? const a = '10'; const b = 20; const c = '30.5'; const result = Numbe…
  6. Oct 9, 2026❗️Что будет на выходе: function* gen() { yield 1; yield 2; yield 3; } async function async…
Threads Profile ViewerView any public Threads profile without an account.Open ThreadLook →Writing with AI? Make it sound human.Metric37 rewrites AI drafts so they read naturally. Free AI detector, 1,500 words free.Try Metric37 →