# Path: borme/utils/strings.py
# def slug2(val):
#     """ Dado el nombre completo de la sociedad, incluyendo el tipo (SL, SA, ...),
#         devuelve el slug de la sociedad.
#     """
#     empresa, _ = regex_empresa_tipo(val)
#     return slugify(empresa)


from django.template.defaulttags import register
from django.utils.text import slugify
from borme.utils.strings import slug2 as borme_slug2
from bormeparser.regex import is_acto_cargo as func_acto_cargo
import datetime

    remainder = list_len % n
    offset = 0
    rows = []
    for i in range(n):
        if remainder:
            start, end = (split+1)*i, (split+1)*(i+1)
        else:
            start, end = split*i+offset, split*(i+1)+offset
        rows.append(thelist[start:end])
        if remainder:
            remainder -= 1
            offset += 1
    return rows


@register.filter
def date_isoformat(date):
    if isinstance(date, datetime.datetime):
        date = date.date()
    return date.isoformat()


@register.filter
def slug(val):
    return slugify(val)


@register.filter
def slug2(val):

# Path: borme/utils/strings.py
# def slug2(val):
#     """ Dado el nombre completo de la sociedad, incluyendo el tipo (SL, SA, ...),
#         devuelve el slug de la sociedad.
#     """
#     empresa, _ = regex_empresa_tipo(val)
#     return slugify(empresa)


# Path: borme/templatetags/utils.py
from django.template.defaulttags import register
from django.utils.text import slugify
from borme.utils.strings import slug2 as borme_slug2
from bormeparser.regex import is_acto_cargo as func_acto_cargo
import datetime


    remainder = list_len % n
    offset = 0
    rows = []
    for i in range(n):
        if remainder:
            start, end = (split+1)*i, (split+1)*(i+1)
        else:
            start, end = split*i+offset, split*(i+1)+offset
        rows.append(thelist[start:end])
        if remainder:
            remainder -= 1
            offset += 1
    return rows


@register.filter
def date_isoformat(date):
    if isinstance(date, datetime.datetime):
        date = date.date()
    return date.isoformat()


@register.filter
def slug(val):
    return slugify(val)


@register.filter
def slug2(val):

    return borme_slug2(val)