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 8859335
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T15:02:07+00:00 2026-06-14T15:02:07+00:00

Somebody asked me if it’s possible to use the (system) clock to display particulary

  • 0

Somebody asked me if it’s possible to use the (system) clock to display particulary stuff? I’m using http://json-time.appspot.com/time.json

For example:
When the clock is between monday and thursday then display “message1”. When it’s between friday and sunday display “message2”.

What I have is:

<script type="text/javascript">
$(document).ready(function(){
  var timezone = "Europe/Berlin";
  $.getJSON("http://json-time.appspot.com/time.json?tz="+timezone+"&callback=?",
    function(data){
      if (data.datetime < ??) { // what do I have to do here?
        alert ("It's monday-thursday in "+timezone);
      } else {
        alert ("It's friday-sunday in "+timezone);
      }
    })
});
  </script>

What do I have to do with “??” ? Any help is more then welcome

  • 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-14T15:02:09+00:00Added an answer on June 14, 2026 at 3:02 pm

    I assume you want something like this:

    var timezone = "Europe/Berlin";
    $.getJSON("http://json-time.appspot.com/time.json?tz=" + timezone + "&callback=?", function(data) {
        var day = new Date(data.datetime).getDay();
        if (day > 0 && day < 4) {   // days start with 0 (Sunday)
            alert("It's monday-thursday in " + timezone);
        } else {
            alert("It's friday-sunday in " + timezone);
        }
    });​
    

    DEMO: http://jsfiddle.net/sXbUv/

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

Sidebar

Related Questions

Somebody advised me to use Entity Framework here when I asked this question: what
Somebody asked me this question: Two processes P1 and P2 are using a shared
Somebody asked similar question not long ago. But nobody answered comprehensively. Assume I have:
I initially asked this on Superuser, but somebody advised me to repost here. I
Somebody know how use OpenX (php app) with Django? I need to use OpenX
Somebody said that when your PHP code and application use global variables then it
Good afternoon, Somebody asked me a question today and neither did I know the
Somebody has asked me to make an app in php that will generate a
I have looked around here to see if somebody has asked this question before
#include<iostream> using namespace std; int main() { int *p,*c; p=(int*)10; c=(int*)20; cout<<(int)p<<(int)c; } Somebody

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.