CalendarGenerator 0.1.2

dotnet add package CalendarGenerator --version 0.1.2
                    
NuGet\Install-Package CalendarGenerator -Version 0.1.2
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="CalendarGenerator" Version="0.1.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="CalendarGenerator" Version="0.1.2" />
                    
Directory.Packages.props
<PackageReference Include="CalendarGenerator" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add CalendarGenerator --version 0.1.2
                    
#r "nuget: CalendarGenerator, 0.1.2"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package CalendarGenerator@0.1.2
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=CalendarGenerator&version=0.1.2
                    
Install as a Cake Addin
#tool nuget:?package=CalendarGenerator&version=0.1.2
                    
Install as a Cake Tool

CalendarGenerator

CalendarGenerator is a .NET 9 library that renders event data as PNG calendar images.

It supports:

  • a traditional monthly calendar;
  • a mobile-friendly seven-day calendar centered on a selected date;
  • chronological event ordering;
  • adaptive event layouts and overflow handling;
  • PNG output returned as a byte[].

Calendar captions use Russian month and weekday names, and weeks start on Monday.

Installation

dotnet add package CalendarGenerator --version 0.1.1

Requirements

  • .NET 9
  • Windows x64 or Linux x64

The package references SkiaSharp and the required Windows and Linux native assets transitively. Noto Sans is embedded in the library, so Linux and Docker consumers do not need to install system fonts or fontconfig to render Latin and Cyrillic text.

Event model

using CalendarGenerator;

var events = new List<CalendarEvent>
{
    new()
    {
        DateStart = new DateTime(2026, 6, 19, 9, 30, 0),
        Title = "Planning meeting"
    },
    new()
    {
        DateStart = new DateTime(2026, 6, 19, 14, 0, 0),
        Title = "Project review"
    }
};

DateStart is treated as local calendar time. No time-zone conversion is performed.

Monthly calendar

using Generator = CalendarGenerator.CalendarGenerator;

byte[] png = Generator.CreateCalendar(events, year: 2026, month: 6);
File.WriteAllBytes("calendar-month.png", png);

The default monthly image size is 1920 by 1080 pixels. The calendar contains a six-week grid and displays adjacent-month dates in gray.

Seven-day calendar

using Generator = CalendarGenerator.CalendarGenerator;

var centerDate = new DateTime(2026, 6, 19);
byte[] png = Generator.CreateCalendarWeek(events, centerDate);
File.WriteAllBytes("calendar-week.png", png);

The seven-day view contains the center date, the three previous dates, and the three following dates. Its default mobile-friendly size is 1080 by 1920 pixels.

The weekly layout adapts to busy days by using one or two columns, redistributing space from empty days, reducing text to a readable minimum, and showing an overflow counter when necessary.

Custom dimensions

var options = new CalendarRenderOptions
{
    Width = 1440,
    Height = 2560
};

byte[] png = Generator.CreateCalendarWeek(events, centerDate, options);

The minimum supported size is 700 by 500 pixels.

Event colors and ordering

Events are sorted by start time and title. Seven distinct light colors are used cyclically so black text remains readable. In the monthly view, events that start within the same minute can share a row.

License

CalendarGenerator is licensed under the MIT License.

Third-party dependency notices are listed in THIRD-PARTY-NOTICES.md.

Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.1.2 134 6/19/2026
0.1.1 121 6/19/2026
0.1.0 125 6/19/2026

Use an embedded Noto Sans font so text renders consistently in Windows and Linux containers.