Skip to main content

apiverve_mayancalendar 1.2.5 copy "apiverve_mayancalendar: ^1.2.5" to clipboard
apiverve_mayancalendar: ^1.2.5 copied to clipboard

Mayan Calendar converts Gregorian dates to the ancient Mayan calendar system. Returns the Long Count, Tzolkin (260-day sacred calendar), and Haab (365-day civil calendar) dates.

Mayan Calendar API - Dart/Flutter Client #

Mayan Calendar converts Gregorian dates to the ancient Mayan calendar system. Returns the Long Count, Tzolkin (260-day sacred calendar), and Haab (365-day civil calendar) dates.

pub package License: MIT

This is the Dart/Flutter client for the Mayan Calendar API.

Installation #

Add this to your pubspec.yaml:

dependencies:
  apiverve_mayancalendar: ^1.2.5

Then run:

dart pub get
# or for Flutter
flutter pub get

Usage #

import 'package:apiverve_mayancalendar/apiverve_mayancalendar.dart';

void main() async {
  final client = MayancalendarClient('YOUR_API_KEY');

  try {
    final response = await client.execute({
      'date': '2024-12-21'
    });

    print('Status: ${response.status}');
    print('Data: ${response.data}');
  } catch (e) {
    print('Error: $e');
  }
}

Response #

{
  "status": "ok",
  "error": null,
  "data": {
    "gregorian": "2024-12-21",
    "longCount": {
      "formatted": "13.0.12.3.3",
      "baktun": 13,
      "katun": 0,
      "tun": 12,
      "winal": 3,
      "kin": 3
    },
    "tzolkin": {
      "number": 6,
      "dayName": "Akbal",
      "formatted": "6 Akbal"
    },
    "haab": {
      "day": 6,
      "monthName": "Kankin",
      "formatted": "6 Kankin"
    },
    "calendarRound": "6 Akbal 6 Kankin",
    "daysSinceEpoch": 1876383
  }
}

API Reference #

Authentication #

All requests require an API key. Get yours at apiverve.com.

License #

MIT License - see LICENSE for details.


Built with Dart for APIVerve

0
likes
130
points
287
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Mayan Calendar converts Gregorian dates to the ancient Mayan calendar system. Returns the Long Count, Tzolkin (260-day sacred calendar), and Haab (365-day civil calendar) dates.

Homepage
Repository (GitHub)
View/report issues
Contributing

License

MIT (license)

Dependencies

http, http_parser

More

Packages that depend on apiverve_mayancalendar