E

e18e/@e18e/date

No description available

e18e35 executions

  • Legacy
  • e18e
  • module-replacement
Connect a repo
npx codemod @e18e/date

Date Codemod

Introduction

This codemod replaces the usage of the date and date/auto npm modules with the built-in JavaScript Date object. This transition helps reduce unnecessary dependencies, thereby decreasing the bundle size and improving the performance of the codebase.

Before

javascript
import date from 'date';
import 'date/auto';

const today = date();
const formattedDate = date.format(today, 'YYYY-MM-DD');

After

javascript
const today = new Date();
const formattedDate = today.toISOString().split('T')[0];

Ready to evolve your codebase?

Build tailored, compiler-aware skills to assess, plan, and automate complex codebase changes.