libyang  5.7.2
libyang is YANG data modelling language parser and toolkit written (and providing API) in C.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
date.c File Reference

ietf-yang-types date and date-no-zone type plugin. More...

#include "plugins_types.h"
#include <assert.h>
#include <ctype.h>
#include <errno.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include "libyang.h"
#include "compat.h"
#include "ly_common.h"
#include "plugins_internal.h"
Include dependency graph for date.c:

Go to the source code of this file.

Macros

#define _GNU_SOURCE   /* strdup */
 
#define _XOPEN_SOURCE   /* strptime */
 

Functions

return difftime (vn1->time, vn2->time)
 
 if (!strcmp(val1->realtype->name,"date"))
 
 LYD_VALUE_GET (val2, vn2)
 

Variables

 else
 
struct lyplg_type_record plugins_date []
 Plugin information for date and date-no-zone type implementation. More...
 
struct lyd_value_date_nzvn1
 
struct lyd_value_date_nzvn2
 

Detailed Description

ietf-yang-types date and date-no-zone type plugin.

Author
Michal Vasko mvask.nosp@m.o@ce.nosp@m.snet..nosp@m.cz Copyright (c) 2019 - 2026 CESNET, z.s.p.o.

This source code is licensed under BSD 3-Clause License (the "License"). You may not use this file except in compliance with the License. You may obtain a copy of the License at

https://opensource.org/licenses/BSD-3-Clause

Definition in file date.c.

Macro Definition Documentation

#define _GNU_SOURCE   /* strdup */

Definition at line 15 of file date.c.

#define _XOPEN_SOURCE   /* strptime */

Definition at line 16 of file date.c.

Function Documentation

return difftime ( vn1->  time,
vn2->  time 
)
if ( strcmpval1->realtype->name,"date")

Definition at line 229 of file date.c.

LYD_VALUE_GET ( val2  ,
vn2   
)

Variable Documentation

else
Initial value:
{
#define LYD_VALUE_GET(value, type_val)
Get the value in format specific to the type.
Definition: tree_data.h:566
struct lyd_value_date_nz * vn1
Definition: date.c:227

Definition at line 235 of file date.c.

struct lyplg_type_record plugins_date[]

Plugin information for date and date-no-zone type implementation.

Note that external plugins are supposed to use:

LYPLG_TYPES = {

Definition at line 398 of file date.c.

struct lyd_value_date_nz* vn1

Definition at line 227 of file date.c.

struct lyd_value_date_nz * vn2

Definition at line 227 of file date.c.