1# `computeSchedule` function
2Combines several schedule segments together to form a complete schedule for a 24-hour period.
3
1# `computeScheduleSegment` function
2Calculates the on/off time spans for a given schedule segment based on the duty cycle.
3
1# `timeSpanUnion` function
2Combines overlapping time spans into single time spans.
3
1# 'isInTimeSpan` function
2Checks if provided time is within the timeframe of the provided time span.
3
8
90. [Log in to Val Town](val.town/auth/signin)
101. [Fork this Val](https://www.val.town/new?code=function+forwardEmail%28e%3A+%7B%0A++from%3A+string%3B%0A++to%3A+string%5B%5D%3B%0A++subject%3A+string%3B%0A++text%3A+string%3B%0A++html%3A+string%3B%0A%7D%29+%7B%0A++console.email%28%7B+html%3A+e.html%2C+subject%3A+e.subject+%7D%29%3B%0A%7D%0A%2F%2F+Forked+from+%40maas.forwardEmail)
111. Publish the Val via **🔒 > Unlisted**
121. Copy the email endpoint via **â‹® > Endpoints > Copy email address**
2Gets information about a specific val.
3
4To access private vals, pass your API token as a secret to the function. Read more about [authentication](https://docs.val.town/api/authentication) to understand how to generate a token and save it as a secret.
5
6Migrated from folder: docs/api/getVal
3Query anything with SQL! Your data is stored in the `data` table.
4
5See the [DuckDB documentation](https://duckdb.org/docs/sql/introduction) for possible functions etc.
6
7Migrated from folder: duckdb/query
9## Authentication
10
11This function requires two keys: one from Github to get your gists, and one from Val Town to make the vals in your account:
12
131. Github token: https://github.com/settings/tokens
16## Usage
17
18You can use this function by calling it and passing your keys like so:
19
20```
7## Authentication
8
9This function requires two keys: one from Github to get your gists, and one from Val Town to make the vals in your account:
10
111. Github token: https://github.com/settings/tokens
14## Usage
15
16You can use this function by calling it and passing your keys like so:
17
18```
3This is an example of using the tiny [peko](https://peko.deno.dev/) example with Val Town - it's a small router that lets you build web apps using the standard [Request](https://developer.mozilla.org/en-US/docs/Web/API/Request) & [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) objects.
4
5Peko just provides routing - matching URLs with functions - and lets you create your own Response object.
6
7### Server examples
A helper function to build a file's email
Simple functional CSS library for Val Town
LangChain (https://langchain.com) Ambassador, KubeSphere (https://kubesphere.io) Ambassador, CNCF OpenFunction (https://openfunction.dev) TOC Member.
import { OpenAI } from "https://esm.town/v/std/openai";
export default async function(req: Request): Promise<Response> {
if (req.method === "OPTIONS") {
return new Response(null, {
headers: {
"Access-Control-Allow-Origin": "*",