> ## 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.

# Day Count

> Calculate the raw day count (numerator) between two dates according to a specified convention. Unlike year-fraction, this returns the integer day count before division by the year basis. Useful when you need the actual day count for custom calculations or reporting. [Tier: FREE, Credits: 0]



## OpenAPI

````yaml api-specs/scheduling.json post /quantlib/scheduling/daycount/day-count
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/daycount/day-count:
    post:
      tags:
        - quantlib-scheduling
      summary: Day Count
      description: >-
        Calculate the raw day count (numerator) between two dates according to a
        specified convention. Unlike year-fraction, this returns the integer day
        count before division by the year basis. Useful when you need the actual
        day count for custom calculations or reporting. [Tier: FREE, Credits: 0]
      operationId: day_count_quantlib_scheduling_daycount_day_count_post
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - start_date
                - end_date
              properties:
                start_date:
                  type: string
                  format: date
                  description: Start date of the period in ISO format (YYYY-MM-DD)
                  example: '2024-03-01'
                end_date:
                  type: string
                  format: date
                  description: End date of the period in ISO format (YYYY-MM-DD)
                  example: '2024-03-31'
                convention:
                  type: string
                  description: Day count convention to use
                  default: ACT/360
                  enum:
                    - ACT/360
                    - ACT/365
                    - ACT/365 Actual
                    - ACT/ACT ISDA
                    - 30/360
                    - 30E/360
                    - 30E/360 ISDA
                    - 30/360 European
                    - Business/252
                  example: 30/360
            example:
              start_date: '2024-03-01'
              end_date: '2024-03-31'
              convention: 30/360
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  data:
                    type: object
                    properties:
                      start_date:
                        type: string
                        format: date
                        description: The start date
                        example: '2024-03-01'
                      end_date:
                        type: string
                        format: date
                        description: The end date
                        example: '2024-03-31'
                      convention:
                        type: string
                        description: The day count convention used
                        example: 30/360
                      day_count:
                        type: integer
                        description: The raw day count according to the convention
                        example: 30
              example:
                success: true
                data:
                  start_date: '2024-03-01'
                  end_date: '2024-03-31'
                  convention: 30/360
                  day_count: 30
        '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
                      - end_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

````