Urgent.News

What's breaking now, across hundreds of outlets.

Tech

Japanese dates in JavaScript: Intl gives hieroglyphs, but not readings

Japanese dates in JavaScript: Intl provides hieroglyphs but not readings. When developing an application for learning Japanese, a calendar with Japanese locale, or date narration, it quickly becomes apparent that: outputting a date in Japanese is easy, but obtaining its reading using standard tools is not possible. Let's figure out what Intl can do and add what's missing. What Intl.DateTimeFormat can do: const d = new Date ( 2026 , 9 , 15 )…

Translated from Russian Read in Russian

The article discusses the challenges of working with Japanese dates in JavaScript, specifically with the Intl API. While Intl can format dates in Japanese, it does not provide the correct readings for the dates. The article provides a solution by creating custom functions to generate the readings for days, months, and weekdays. For example, the 15th of October, 2026, would be written as "10月15日(木)" but read as "じゅうがつじゅうごにち(もくようび)".

The solution involves creating arrays of exceptions and rules for reading dates, such as the readings for months (しがつ, しちがつ, くがつ) and special days (ついたち, ふつか, みっか).

Written by urgent.news from Dev.to's report — not a translation of it. Machine-written; may contain errors — check the original.

Read the original at dev.to →

Report a problem with this story

More in Tech

Build Better Engineers, Not Just Better Software

I once worked on a coding project where I was effectively the junior. I had picked up a fix, worked through it and opened a pull request. I was pumped about it.

  • Lead DevOps consultants guide junior engineers.
  • Psychological safety crucial for team growth.
  • Constructive feedback encourages independent problem-solving.

A trash cleanup that deleted records a day early, and how I tested it in 2 minutes

Twenty, the open-source CRM, keeps deleted records in the trash for 14 days before deleting them for good. At least, that's what it says.

  • CRM Twenty retains deleted records for 14 days before permanent deletion.
  • Bug caused record deleted at 23:59 UTC to be permanently deleted at 00:10 UTC.
  • ChronoStack allows testing of time-based features in two minutes.

Twitter/X API Rate Limits in 2026: The Complete Guide

The #1 Pain Point for Twitter API Developers If you've worked with the X (formerly Twitter) API for any length of time, you've hit a rate limit. It's practically a rite of passage.

  • Twitter/X API rate limits changed in February 2026 to a pay-per-use model.
  • New accounts receive a $20 credit and first auto-recharge match up to $50.
  • Responses include three rate limit headers: limit, remaining, and reset timestamps.

More from Saturday 21 November →