DeveloperBreeze

Date Formatting for Specific Date ('Y-m-d')

echo date('Y-m-d', strtotime('next Monday'));

echo (new DateTime('2023-12-25'))->format('Y-m-d');

Related Posts

More content you might like

Tutorial

Connecting a Node.js Application to an SQLite Database Using sqlite3

SQLite, combined with Node.js, offers a powerful and efficient way to manage data for your applications. Whether you're building a small utility or a larger application, understanding how to interact with databases is an invaluable skill.

Key Takeaways:

Oct 24, 2024
Read More
Cheatsheet
javascript

JavaScript Utility Libraries Cheatsheet

<table>
  <tr>
    <th>Function</th>
    <th>Description</th>
    <th>Example</th>
  </tr>
  <tr>
    <td><code>R.compose(...functions)
    Composes functions from right to left.
    R.compose(Math.abs, R.add(1))(-5) => 4
  
  
    R.curry(fn)
    Returns a curried version of the provided function.
    R.curry((a, b) => a + b)(1)(2) => 3
  
  
    R.filter(predicate, list)
    Returns a new list containing only the elements that satisfy the predicate.
    R.filter(x => x % 2 === 0, [1, 2, 3, 4]) => [2, 4]
  
  
    R.map(fn, list)
    Applies the function to each element of the list.
    R.map(x => x * 2, [1, 2, 3]) => [2, 4, 6]
  
  
    R.reduce(reducer, initialValue, list)
    Reduces the list to a single value using the reducer function.
    R.reduce(R.add, 0, [1, 2, 3]) => 6
  

Date-fns is a modern JavaScript date utility library that provides over 200 functions for manipulating dates without modifying native JavaScript objects.

Aug 21, 2024
Read More
Cheatsheet
mysql

MySQL Cheatsheet: Comprehensive Guide with Examples

No preview available for this content.

Aug 20, 2024
Read More
Tutorial
javascript php

Integrating Laravel and React with Vite: Using Databases and PHP in a Full-Stack Project

Migrations in Laravel allow you to define and modify your database schema. Let's create a migration for a posts table:

php artisan make:migration create_posts_table

Aug 14, 2024
Read More

Discussion 0

Please sign in to join the discussion.

No comments yet. Be the first to share your thoughts!