Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7929293
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T20:01:29+00:00 2026-06-03T20:01:29+00:00

I currently have a date which is formatted in PHP like this date(‘D d

  • 0

I currently have a date which is formatted in PHP like this date('D d F g:i A Y', $l2['available']) which outputs a date in this format: Tue 15 May 5:45 PM 2012

I want to achieve this same format in Javascript/jQuery.

So far I’ve done this:

var lessonTime = new Date(data.lessons[i].available * 1000);
lessonTime.toDateString();  

which results in the date below:

Thu Mar 22 2012

Is there a way to control the format like you can with PHP date function?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T20:01:31+00:00Added an answer on June 3, 2026 at 8:01 pm

    There’s very little native date formatting in JavaScript, nothing comparable to the PHP formatting capabilities. There are a few libraries that can help with this:

    • Date.js extends Date.toString() to accept formatting parameters

    • jQuery has a dateFormat plugin

    • D3.js has time-formatting support – even if you don’t use the whole library, you could probably use the time formatter by itself.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this date and time format: 2010-05-19 07:53:30 and would like to change
I currently have a form which takes a date in the format m/d/y -
I currently have the following code $TimelineEvents[$i][Date] = date(F j, Y, strtotime($Date)); Which works
I'm stuck trying to figure this one out.. We currently have a date criteria
I currently have a registration form which checks a persons date of birth via
I have an Oracle Date type to which I need to insert the current
I have a jquery datepicker which is renders the current date by default as
I currently have a recently started project in development with a 2010 target date
We currently have a utilities class that handles a lot of string formatting, date
I currently have a query similar to: SELECT users.fname, users.lname, sales.date FROM users LEFT

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.