busdays function not return correct date
33 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Yu Li
el 8 de Nov. de 2024 a las 0:16
Comentada: Walter Roberson
el 8 de Nov. de 2024 a las 4:25
Hi:
I'm trying to query the bus date list from given period, but I notice it returns different result by given the same date period, just at different time.
is there any mistake with my operation?
sample code is shown below:
load date_1
load date_2
load date_3
load date_4
busdays(date_1,date_2)
busdays(date_3,date_4)
Thanks!
Yu
0 comentarios
Respuesta aceptada
Walter Roberson
el 8 de Nov. de 2024 a las 2:23
date_1 and date_2 both happen to have times of 09:30
date_3 has a time of 10:30. date_4 has a time of 9:30
The internal logic is
first_date : 1 : last_date
and then filter down to the business dates.
When the start time is 10:30 the generated times will all be 10:30 .
Note that date_4 itself will be excluded, since it's 9:30 time is after the 10:30 time of the starting time.
Más respuestas (0)
Ver también
Categorías
Más información sobre Dates and Time en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!