DayRound

DayRound[date,daytype]

rounds date to the nearest day of daytype, using the next-day rounding convention.

DayRound[date,daytype,rounding]

rounds date to the nearest day of daytype, using rounding.

Details and Options

  • Date can be specified in the following forms:
  • DateObject[]date object
    {y,m,d}year, month, day
    {y,m}the first day of the specified month
    {y}the first day of the first month of the year y
    "string"date as a string ("Jan. 1, 2000")
  • DayRound returns a DateObject expression.
  • Possible day types are: All, "Weekday", "Weekend", Monday through Sunday, "EndOfMonth", "BeginningOfMonth", and "BusinessDay".
  • DayRound[date] is equivalent to DayRound[date,All].
  • Recognized rounding values are: "Next", "Following", "ModifiedFollowing", "Preceding", "Previous", and "ModifiedPreceding".
  • If date is of daytype, DayRound has no effect.
  • DayRound takes the following options:
  • CalendarType "Gregorian"calendar in which the dates have been specified
    HolidayCalendar {"UnitedStates","Default"}holiday schedule and subspecification for the business day and holiday computations
  • In the Jewish calendar, the weekdays are Sunday through Thursday.

Examples

open allclose all

Basic Examples  (3)

Adjust the first of the year to the nearest following business day:

Determine the nearest weekend day following the beginning of February 2012:

Find the next Sunday:

Scope  (2)

Adjust a date, subject to a business day convention:

"ModifiedFollowing" rounds to the next business day, unless it is in another month:

Options  (2)

CalendarType  (1)

Compute the next business day using Jewish calendar dates:

HolidayCalendar  (1)

Different markets within a country may have different holiday schedules:

Applications  (1)

Adjust a date, subject to various conventions:

Wolfram Research (2012), DayRound, Wolfram Language function, https://reference.wolfram.com/language/ref/DayRound.html (updated 2014).

Text

Wolfram Research (2012), DayRound, Wolfram Language function, https://reference.wolfram.com/language/ref/DayRound.html (updated 2014).

CMS

Wolfram Language. 2012. "DayRound." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2014. https://reference.wolfram.com/language/ref/DayRound.html.

APA

Wolfram Language. (2012). DayRound. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/DayRound.html

BibTeX

@misc{reference.wolfram_2024_dayround, author="Wolfram Research", title="{DayRound}", year="2014", howpublished="\url{https://reference.wolfram.com/language/ref/DayRound.html}", note=[Accessed: 30-December-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_dayround, organization={Wolfram Research}, title={DayRound}, year={2014}, url={https://reference.wolfram.com/language/ref/DayRound.html}, note=[Accessed: 30-December-2024 ]}