Questions tagged [dayofweek]

Usually a function that returns day of the week when a certain date object is passed.

Get day of day of the week in:

691 questions
-2
votes
1 answer

How to know the week numbre from a goiven date in Laravel?

For Example, when I give it 01/01/2020 it should know that it's week 1 or 12/03/2020 it is week 13. All this in a Laravel app.
-2
votes
1 answer

Using day of week to return specific object

I am currently working on a fitness application and am aiming for a user of the site to click a button and they will be returned a workout which is recommended on the day of the week it is. For example if its a Monday and the user presses the button…
-2
votes
1 answer

How can i convert days names to dates of the current month?

I have an array of days in a month excluding friday and sunday as they aren't inculded in policy, i want to convert the array of days names to the dates of the current month but when i convert it is in incorrect format because it shows for different…
Sherwin Samuel
  • 41
  • 1
  • 1
  • 4
-2
votes
3 answers

Escaping while loop, while conditions are false

I'm seeing this not wait during specified times. I've been trying to learn c# and don't know exactly what all the syntax is yet. I just want to know if there are better ways of accomplishing this task. while (DateTime.Now.DayOfWeek ==…
-2
votes
2 answers

Someone please explain how Calendar.get(cal.DAY_OF_WEEK) gives correct output while cal.DAY_OF_WEEK is default and not modified?

I want to get the day for the date. When i set the date in cal.set(year,month-1,day), Sets the values for the calendar fields YEAR, MONTH, DAY_OF_MONTH, HOUR_OF_DAY, and MINUTE. Previous values of other fields are retained. Thus, when I do…
-2
votes
1 answer

I need help using enums to get this program working

So this is my first time asking on stackoverflow but i need help with this problem. I have to use enums that includes constructors, methods, and static methods. So everything in the main was already written and rest I wrote it but I am lost now. The…
-2
votes
4 answers

How to subtring to a DayOfWeek var?

how can I add a substring to the lbl_diasemana label? var culture = new System.Globalization.CultureInfo("pt-BR"); var diasemana = culture.DateTimeFormat.GetDayName(DateTime.Today.DayOfWeek); lbl_diasemana.Text = diasemana;
user8190735
-2
votes
2 answers

Date from week of year returning date not in week

I have come across a rather strange "bug". When getting a date for a week of a year using this method: let dates = NSMutableArray() let cal = NSCalendar.currentCalendar() cal.firstWeekday = 2 let formatter = NSDateFormatter() formatter.dateFormat =…
Emil
  • 7,220
  • 17
  • 76
  • 135
-2
votes
1 answer

Get dates of next 8 Saturdays (javascript)

I was able to get date of closest Saturday - CodePen Need help with finding dates of the next seven saturdays. Thank you function myFunction(x){ var now = new Date(); now.setDate(now.getDate() + (x+(7-now.getDay())) % 7); …
Vitaliy Hayda
  • 113
  • 2
  • 11
-2
votes
1 answer

How to display and identify all days (e.g monday, tuesday) per month individually?

Please help me. I stuck for many hours. I want to display all days (e.g monday, tuesday) individually every month and display also the respective date of each days. How can I do that? I really need help, please. Thank you Desired…
yingyang
  • 47
  • 2
  • 12
-2
votes
2 answers

In Python i need a day_name function

A question I can't work out, is how to write a function day_name that converts an integer 0-6 into Sunday to Monday, 0 being Sunday. I found this helpful but the year and month confuse me = which day of week given a date python
-2
votes
1 answer

c# time-slot calculation (today-givenDate)

I am preparing a class which calculates penalty for a library. For example: I have a book. I will return this book 12.11.2009. But I delay this return date. I returned the book on 30.11.2009. I will pay a penalty as money. How can I count (November…
cethint
  • 2,231
  • 8
  • 28
  • 31
-3
votes
2 answers

Python print day name of week from number

I'm creating a program which I have to put a number and when I run the program, the solution should be the day for that number. But I don't know how to do. The program I did was this: num = 4 if(num = 1) print('Monday') elif(num = 2) …
-3
votes
2 answers

C# looking for equivalent to DayOfWeek.Tuesday

I would like to change in an existing content one condition to a little bit more flexible and struggel here.: the original looks like: if (object.dayofweek == DayOfWeek.Tuesday) { } my first approach was to replace Tuesday by an integer, but this…
-3
votes
4 answers

How to get day of week name from selected date month and year in Android?

I tried the below code but it gives me the name of the day of week two days ago. DatePicker picker; int date = picker.DayOfMonth; int month = (picker.Month + 1);//month is 0 based int year = picker.Year; SimpleDateFormat simpledateformat…
1 2 3
45
46