> ## Documentation Index
> Fetch the complete documentation index at: https://docs.fincept.in/llms.txt
> Use this file to discover all available pages before exploring further.

# Adjust Date

> Adjust a date to a valid business day according to a specified business day convention and calendar. If the date falls on a weekend or holiday, it will be moved to the nearest valid business day based on the convention. Essential for ensuring payment dates, settlement dates, and trade dates fall on valid business days. [Tier: FREE, Credits: 0]



## OpenAPI

````yaml api-specs/scheduling.json post /quantlib/scheduling/adjustment/adjust-date
openapi: 3.1.0
info:
  title: FinceptQuantLib API - Scheduling
  description: Scheduling module endpoints for FinceptQuantLib API
  version: 3.0.0
  contact:
    name: Fincept API Support
    url: https://fincept.in
servers:
  - url: https://api.fincept.in
    description: Fincept API Production Server
security:
  - APIKeyHeader: []
tags:
  - name: quantlib-scheduling
    description: API endpoints for scheduling operations
paths:
  /quantlib/scheduling/adjustment/adjust-date:
    post:
      tags:
        - quantlib-scheduling
      summary: Adjust Date
      description: >-
        Adjust a date to a valid business day according to a specified business
        day convention and calendar. If the date falls on a weekend or holiday,
        it will be moved to the nearest valid business day based on the
        convention. Essential for ensuring payment dates, settlement dates, and
        trade dates fall on valid business days. [Tier: FREE, Credits: 0]
      operationId: adjust_date_quantlib_scheduling_adjustment_adjust_date_post
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - date
              properties:
                date:
                  type: string
                  format: date
                  description: Date to adjust in ISO format (YYYY-MM-DD)
                  example: '2024-12-25'
                adjustment:
                  type: string
                  description: >-
                    Business day adjustment convention. Following: next business
                    day. Modified Following: next business day unless it crosses
                    month boundary, then previous. Preceding: previous business
                    day. Modified Preceding: previous business day unless it
                    crosses month boundary, then next. Unadjusted: no adjustment
                  default: Modified Following
                  enum:
                    - Following
                    - Modified Following
                    - Preceding
                    - Modified Preceding
                    - Unadjusted
                  example: Modified Following
                calendar:
                  type: string
                  description: Calendar to use for determining business days
                  default: Weekend
                  enum:
                    - US
                    - UK
                    - TARGET
                    - Japan
                    - Weekend
                  example: US
            example:
              date: '2024-12-25'
              adjustment: Modified Following
              calendar: US
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  data:
                    type: object
                    properties:
                      original_date:
                        type: string
                        format: date
                        description: The input date before adjustment
                        example: '2024-12-25'
                      adjusted_date:
                        type: string
                        format: date
                        description: The adjusted business day
                        example: '2024-12-26'
                      adjustment:
                        type: string
                        description: The adjustment convention used
                        example: Modified Following
                      calendar:
                        type: string
                        description: The calendar used
                        example: US
                      was_adjusted:
                        type: boolean
                        description: >-
                          True if the date was changed, false if it was already
                          a business day
                        example: true
              example:
                success: true
                data:
                  original_date: '2024-12-25'
                  adjusted_date: '2024-12-26'
                  adjustment: Modified Following
                  calendar: US
                  was_adjusted: true
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '402':
          $ref: '#/components/responses/InsufficientTierError'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: array
                    items:
                      type: object
              example:
                detail:
                  - loc:
                      - body
                      - date
                    msg: field required
                    type: value_error.missing
      security:
        - APIKeyHeader: []
components:
  responses:
    UnauthorizedError:
      description: Authentication information is missing or invalid
      content:
        application/json:
          schema:
            type: object
            properties:
              detail:
                type: string
                example: Invalid API key
    InsufficientTierError:
      description: API tier insufficient for this endpoint
      content:
        application/json:
          schema:
            type: object
            properties:
              detail:
                type: string
                example: Endpoint requires Basic tier or higher
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: X-API-Key
      description: >-
        API key for authentication. Get your key at
        https://api.fincept.in/auth/register

````