Questions tagged [weekday]

A day of the week. Used for questions related to programming problems that involve `weekday`: calculation, triggering an event, discovery of a specific day etc

462 questions
0
votes
3 answers

Find the weekday of month by date

I am trying to find the number of weekday of month by passing a date in C#. For ex.: If I pass "3/6/2013 (6-Mar-2013)" the function should say 1st wednesday of month. If I pass "3/1/2013 (1-Mar-2013)" the function should say 1st friday of month. If…
Prasad
  • 58,881
  • 64
  • 151
  • 199
0
votes
4 answers

PHP get weekday of setDate()

I'm trying to create a calendar in php. I need to get the weekday (sunday, monday, etc) of the first day of the month. My code so far is:
Vince
  • 2,596
  • 11
  • 43
  • 76
0
votes
3 answers

Ruby, how to know if today is in a list of approved days?

I'd like one of my classes to only run on Tuesday,Wed,and Thursday. I have the following: class ReminderJob def perform begin # Days to send: Tuesdays, Wednesdays, Thursdays next Date.today.wday.instance_of?('2,3,4') The…
AnApprentice
  • 108,152
  • 195
  • 629
  • 1,012
0
votes
3 answers

vb.net - How to get the day number from a weekday name

Long story short: I need the inverted function of WeekdayName(), in the following terms: You provide a week day name (e.g. Sunday) You get the correspondent week day number (that depends which is the first week day as returned in WeekdayName, e.g.,…
Sebastian
  • 4,770
  • 4
  • 42
  • 43
0
votes
1 answer

I want to represent weekdays in a gridview

Alex
  • 8,908
  • 28
  • 103
  • 157
0
votes
1 answer

How long time till a Weekday or a Date

I want to find out how long time there is till a specific Weekday from Now. I have searched everywhere, but can't really find anything. I THINK I have to use the DateDiff-function together with the WeekDay-function somehow. The scenario is: I have…
MicBehrens
  • 1,780
  • 8
  • 34
  • 57
-1
votes
1 answer

Difference between today,week start

How to get the difference between datetime.datetime.utcnow(), and the start of week? I want start of week of "date=17,month=12,year=2022,hour=x,minute=y,second=z" to be: "date=12,month=12,year=2022,hour=0,minute=0,second=0", where x,y,z are…
Neptotech -vishnu
  • 1,096
  • 8
  • 23
-1
votes
3 answers

if conditions in while loop

while loop with a if statement is not printing my if statement var rest = 0 while(rest <=10) { rest ++; console.log(rest); if (rest == 10) console.log('Done!')
-1
votes
3 answers

Python datetime if week day ... do

I will make a python script that say me the correct weekday. This is what i imagine: def wishMe(): hour = datetime.datetime.now().hour if hour >= 0 and hour < 12: os.system("say Good Morning") elif hour >= 12 and hour < 18: os.system("say…
-1
votes
2 answers

How to auto-fill day column from date without dragging in google sheets?

In Google Sheets, I have two columns, date and day, when date is entered i want day to be filled automatically, For example, if you set A1 as 1/12/21 then day cell should change to Wednesday. How do we do that?
Zil Sanghvi
  • 74
  • 10
-1
votes
2 answers

Elegant way in java to look up a previous weekday based on currency and current date

Most of the regions in the world consider Saturday and Sunday as Weekends which means Monday to Friday are considered as weekdays. However, in middle-eastern countries, Friday and Saturday are considered as Weekends whereas Sunday to Thursday are…
Sandy
  • 459
  • 2
  • 6
  • 19
-1
votes
2 answers

get next 6 weedays Issue, Javascript

I need the next 6 weekdays starting from today. The term getDay() gives me a value between 0-6. If I simple add +1 every next day, I get at a certain day values which are not in the Array, how can i fix this issue? (Everything after 6 is…
Lukas
  • 31
  • 1
  • 5
-1
votes
1 answer

How do I Run a Workbook_Open code only during the weekdays? (M-F)

I have a series of Application.OnTime codes that need ran on specific days throughout the week (M-F). I don't need these codes to run on Saturday/Sunday. How do I code in to only run M-F? The Application.OnKey codes need to run every day. Thank…
-1
votes
1 answer

Using 'moment-weekday-calc' in node.js Typescript

Unable to use the Javascript plugin 'moment-weekday-calc' in a Node.Js Typescript project. moment-weekday-calc does not have a typed version. My code as written in Javascript: const moment = require('moment'); require('moment-weekday-calc'); const…
Ezekiel
  • 167
  • 3
  • 11
-1
votes
2 answers

How to solve the weekday function problem Python

I am very new to Python and we were told to write the weekday function without any modules like e.g. daytime etc. But it doesn't work and i am not sure where is a problem def weekDay (day,month,year): global y0 global m0 global x y0…
123
  • 67
  • 5