Full Code of asgrim/year for AI

master 166c32efdb49 cached
15 files
3.6 KB
1.2k tokens
1 requests
Download .txt
Repository: asgrim/year
Branch: master
Commit: 166c32efdb49
Files: 15
Total size: 3.6 KB

Directory structure:
gitextract_vwcet6qf/

├── LICENSE
├── README.md
├── currentYear
├── en/
│   ├── currentYear
│   ├── isLeapYear
│   ├── nextYear
│   └── previousYear
├── he/
│   ├── currentYear
│   ├── nextYear
│   └── previousYear
├── nextYear
├── previousYear
└── zh-cn/
    ├── currentYear
    ├── nextYear
    └── previousYear

================================================
FILE CONTENTS
================================================

================================================
FILE: LICENSE
================================================
The MIT License (MIT)

Copyright (c) 2015 James Titcumb

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


================================================
FILE: README.md
================================================
YaaS
====

Year as a Service. Providing you with extremely accurate year as an API service, since 2015.

* **Current year:** https://raw.github.com/asgrim/year/master/en/currentYear
* **Next year:** https://raw.github.com/asgrim/year/master/en/nextYear
* **Previous year:** https://raw.github.com/asgrim/year/master/en/previousYear

## Examples

Note that these examples may not take into account good security practices, for example escaping output to prevent XSS vulnerabilities.

### PHP

```php
<?php
$year = file_get_contents('https://raw.github.com/asgrim/year/master/en/currentYear');

echo $year; // 2025
```

### Ruby

```ruby
require 'net/http'
year = Net::HTTP.get_response(URI.parse("https://raw.github.com/asgrim/year/master/en/currentYear")).body
p year # 2025
```

### Python

```python
import urllib2
year = urllib2.urlopen('https://raw.github.com/asgrim/year/master/en/currentYear').read(1000).strip()
print year; # 2025
```
### JavaScript

```javascript
// Fetch
fetch('https://raw.githubusercontent.com/asgrim/year/master/en/currentYear')
    .then(resp => resp.json())
    .then(year => console.log(year)) // 2025

// XMLHttpRequest
let xhr = new XMLHttpRequest()
xhr.open('GET', 'https://raw.githubusercontent.com/asgrim/year/master/en/currentYear', true);
xhr.onload = () => {
    if (xhr.status >= 200 && xhr.status < 300 || xhr.status === 304) {
        console.log(xhr.responseText)
    }
};
xhr.send(); // 2020
```
### Bash

```Bash
#!/bin/bash
## Fetch
page="$(curl -s https://raw.githubusercontent.com/asgrim/year/master/en/currentYear)"
echo "$page" # 2025

```
## BC Break

In the future, we may have to break BC by removing the root "[currentYear](https://raw.github.com/asgrim/year/master/currentYear)". You should use "[en/currentYear](https://raw.github.com/asgrim/year/master/en/currentYear)" instead.

## Internationalisation (i18n)

YaaS also supports the following calendars:

Hebrew (he):

* **Current year:** https://raw.github.com/asgrim/year/master/he/currentYear
* **Next year:** https://raw.github.com/asgrim/year/master/he/nextYear
* **Previous year:** https://raw.github.com/asgrim/year/master/he/previousYear

Chinese (zh-cn):

* **Current year:** https://raw.github.com/asgrim/year/master/zh-cn/currentYear
* **Next year:** https://raw.github.com/asgrim/year/master/zh-cn/nextYear
* **Previous year:** https://raw.github.com/asgrim/year/master/zh-cn/previousYear

## FAQs

**Should I use this in my real application?**
* No.

**r u troleing me?**
* Yes.


================================================
FILE: currentYear
================================================
2026


================================================
FILE: en/currentYear
================================================
2026


================================================
FILE: en/isLeapYear
================================================
false


================================================
FILE: en/nextYear
================================================
2027


================================================
FILE: en/previousYear
================================================
2025


================================================
FILE: he/currentYear
================================================
5785


================================================
FILE: he/nextYear
================================================
5786


================================================
FILE: he/previousYear
================================================
5784


================================================
FILE: nextYear
================================================
2027


================================================
FILE: previousYear
================================================
2025


================================================
FILE: zh-cn/currentYear
================================================
4722


================================================
FILE: zh-cn/nextYear
================================================
4723


================================================
FILE: zh-cn/previousYear
================================================
4721
Download .txt
gitextract_vwcet6qf/

├── LICENSE
├── README.md
├── currentYear
├── en/
│   ├── currentYear
│   ├── isLeapYear
│   ├── nextYear
│   └── previousYear
├── he/
│   ├── currentYear
│   ├── nextYear
│   └── previousYear
├── nextYear
├── previousYear
└── zh-cn/
    ├── currentYear
    ├── nextYear
    └── previousYear
Condensed preview — 15 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (4K chars).
[
  {
    "path": "LICENSE",
    "chars": 1080,
    "preview": "The MIT License (MIT)\n\nCopyright (c) 2015 James Titcumb\n\nPermission is hereby granted, free of charge, to any person obt"
  },
  {
    "path": "README.md",
    "chars": 2502,
    "preview": "YaaS\n====\n\nYear as a Service. Providing you with extremely accurate year as an API service, since 2015.\n\n* **Current yea"
  },
  {
    "path": "currentYear",
    "chars": 5,
    "preview": "2026\n"
  },
  {
    "path": "en/currentYear",
    "chars": 5,
    "preview": "2026\n"
  },
  {
    "path": "en/isLeapYear",
    "chars": 6,
    "preview": "false\n"
  },
  {
    "path": "en/nextYear",
    "chars": 5,
    "preview": "2027\n"
  },
  {
    "path": "en/previousYear",
    "chars": 5,
    "preview": "2025\n"
  },
  {
    "path": "he/currentYear",
    "chars": 5,
    "preview": "5785\n"
  },
  {
    "path": "he/nextYear",
    "chars": 5,
    "preview": "5786\n"
  },
  {
    "path": "he/previousYear",
    "chars": 5,
    "preview": "5784\n"
  },
  {
    "path": "nextYear",
    "chars": 5,
    "preview": "2027\n"
  },
  {
    "path": "previousYear",
    "chars": 5,
    "preview": "2025\n"
  },
  {
    "path": "zh-cn/currentYear",
    "chars": 5,
    "preview": "4722\n"
  },
  {
    "path": "zh-cn/nextYear",
    "chars": 5,
    "preview": "4723\n"
  },
  {
    "path": "zh-cn/previousYear",
    "chars": 5,
    "preview": "4721\n"
  }
]

About this extraction

This page contains the full source code of the asgrim/year GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 15 files (3.6 KB), approximately 1.2k tokens. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!