KDK_EDID_GET_WEEK(3)

📦 version 3.0.1.4, in arch rolling, ubuntu resolute, ubuntu stonking

✨ KDK_EDID_GET_WEEK(3) ✨

okay so bestie, we're in the Library Functions Manual section, and today's main character is kdk_edid_get_week 💖 pull up a chair, this one's short but it's so useful.


🌸 NAME 🌸

kdk_edid_get_week — 获取显示器的生产日期/周 (aka: get the manufacturing date/week of your monitor) 🗓️


🎀 SYNOPSIS 🎀

#include <libkyedid.h>

extern int kdk_edid_get_week(char *name);

Link with -lkyedid.


🦋 Detailed Description 🦋

The main function of the interface is to obtain the manufacturing date(week) of the screen. fr fr, that's the whole job — it goes and asks your display "when were you born, babe?" and comes back with a week number. 👑

The argument name is the current interface of the screen. (iykyk — you get those interface names from kdk_edid_get_interface().)


💅 RETURN VALUE 💅

  • On success, returns the screen manufacturing date(week) of type int. slay, a whole week number, just for you 🎉
  • On error, return -1. not the vibe. something went wrong, bestie 😭

🔥 EXAMPLES 🔥

here's the full glow-up demo — it walks every interface and prints literally everything about your screens:

#include "libkyedid.h"
#include <stdio.h>
#include <stdlib.h>

int main()
{
    char** name = kdk_edid_get_interface();
    size_t count = 0;
    while (name[count])
    {
        printf("当前接口 = %s0, name[count]);
        float gamma = kdk_edid_get_gamma(name[count]);
        printf("gamma = %0.2f0, gamma);
        float size = kdk_edid_get_size(name[count]);
        printf("size = %0.1f0, size);
        char *max_resolution = kdk_edid_get_max_resolution(name[count]);
        printf("max_resolution = %s0, max_resolution);
        free(max_resolution);
        char *model = kdk_edid_get_model(name[count]);
        printf("model = %s0, model);
        free(model);
        char *area = kdk_edid_get_visible_area(name[count]);
        printf("area = %s0, area);
        free(area);
        char *manufacturer = kdk_edid_get_manufacturer(name[count]);
        printf("manufacturer = %s0, manufacturer);
        free(manufacturer);
        int week = kdk_edid_get_week(name[count]);
        printf("week = %d0, week);
        int year = kdk_edid_get_year(name[count]);
        printf("year = %d0, year);
        int primary = kdk_edid_get_primary(name[count]);
        printf("%s0, primary == 1 ? "是" : "否");

        char *resolution = kdk_edid_get_resolution(name[count]);
        printf("resolution = %s0, resolution);
        free(resolution);

        char *ratio = kdk_edid_get_ratio(name[count]);
        printf("ratio = %s0, ratio);
        free(ratio);

        char *character = kdk_edid_get_character(name[count]);
        printf("character = %s0, character);
        free(character);

        printf("---------------------------------------0);
        count ++;
    }
    kdk_edid_freeall(name);
    return 0;
}
quick note bestie — the example is reproduced <b>exactly</b> as it appears in the page, typos and all. don't go "fixing" it in your head and then wondering why it won't compile 🙈 copy it as-is or go read the real header.

👑 CONFORMING TO 👑

These functions are as per the withdrawn POSIX.1e draft specification. (withdrawn, bestie — it's giving vintage. we still love her.)

The following functions are Linux extensions:

  • kdk_edid_get_interface()
  • kdk_edid_get_gamma()
  • kdk_edid_get_size()
  • kdk_edid_get_max_resolution()
  • kdk_edid_get_model()
  • kdk_edid_get_visible_area()
  • kdk_edid_get_manufacturer()
  • kdk_edid_get_year()
  • kdk_edid_get_primary()
  • kdk_edid_get_resolution()
  • kdk_edid_get_ratio()
  • kdk_edid_get_character() and
  • kdk_edid_freeall()

🌈 SEE ALSO 🌈

go read the whole friend group, they ate 💖


and that's the whole page, bestie 🫶 this one's from the <b>Linux Programmer's Manual</b>, dated <b>Fri Aug 25 2023</b> — go forth and find out what week your monitor was born, no cap 💅✨

📦 where this page comes from